]
Dan Berindei resolved ISPN-4161.
--------------------------------
Fix Version/s: 8.1.0.Final
Resolution: Done
Remove cache command for caches not created on all nodes fails with
CacheException and an NPE root cause
--------------------------------------------------------------------------------------------------------
Key: ISPN-4161
URL:
https://issues.jboss.org/browse/ISPN-4161
Project: Infinispan
Issue Type: Bug
Reporter: Vladimir Blagojevic
Fix For: 8.1.0.Final
While testing creation of intermediate caches for M/R tasks I noticed that remove command
fails with CacheException and NPE if the cache has not been created on all nodes.
The culprit is in RemoteCommandsFactory where the following line of code:
registry.getNamedComponentRegistry(cacheName).getComponent(PersistenceManager.class)
assumes that component with cacheName has been registered.
org.infinispan.commons.CacheException: Error removing cache
at org.infinispan.manager.DefaultCacheManager.removeCache(DefaultCacheManager.java:477)
at org.infinispan.distexec.mapreduce.MapReduceTask.execute(MapReduceTask.java:421)
at
org.infinispan.distexec.mapreduce.DistributedIntermediateCacheFourNodesMapReduceTest.testIntermediateCacheNotCreatedOnAllNodes(DistributedIntermediateCacheFourNodesMapReduceTest.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from
DistributedIntermediateCacheFourNodesMapReduceTest-NodeD-24545, see cause for remote stack
trace
at
org.infinispan.remoting.transport.AbstractTransport.checkResponse(AbstractTransport.java:41)
at
org.infinispan.remoting.transport.AbstractTransport.parseResponseAndAddToResponseList(AbstractTransport.java:66)
at
org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:548)
at org.infinispan.manager.DefaultCacheManager.removeCache(DefaultCacheManager.java:469)
... 22 more
Caused by: org.infinispan.commons.CacheException: Problems invoking command.
at
org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:219)
at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:457)
at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:374)
at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:247)
at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:668)
at org.jgroups.JChannel.up(JChannel.java:711)
at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1030)
at org.jgroups.protocols.RSVP.up(RSVP.java:187)
at org.jgroups.protocols.FRAG2.up(FRAG2.java:165)
at org.jgroups.protocols.FlowControl.up(FlowControl.java:370)
at org.jgroups.protocols.FlowControl.up(FlowControl.java:381)
at org.jgroups.protocols.tom.TOA.up(TOA.java:121)
at org.jgroups.protocols.pbcast.GMS.up(GMS.java:1040)
at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:234)
at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:404)
at org.jgroups.protocols.pbcast.NAKACK2.handleMessage(NAKACK2.java:774)
at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:570)
at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:296)
at org.jgroups.protocols.Discovery.up(Discovery.java:379)
at org.jgroups.protocols.TP.passMessageUp(TP.java:1502)
at org.jgroups.protocols.TP$MyHandler.run(TP.java:1719)
... 3 more
Caused by: java.lang.NullPointerException
at
org.infinispan.commands.RemoteCommandsFactory.fromStream(RemoteCommandsFactory.java:198)
at
org.infinispan.marshall.exts.ReplicableCommandExternalizer.fromStream(ReplicableCommandExternalizer.java:106)
at
org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:151)
at
org.infinispan.marshall.exts.CacheRpcCommandExternalizer.readObject(CacheRpcCommandExternalizer.java:62)
at
org.infinispan.marshall.core.ExternalizerTable$ExternalizerAdapter.readObject(ExternalizerTable.java:404)
at
org.infinispan.marshall.core.ExternalizerTable.readObject(ExternalizerTable.java:212)
at
org.infinispan.marshall.core.JBossMarshaller$ExternalizerTableProxy.readObject(JBossMarshaller.java:152)