Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-10904

CallerRunsRejectOnShutdownPolicy should throw IllegalLifecycleStateException

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 10.0.1.Final
    • Fix Version/s: 10.1.0.Beta1
    • Component/s: Core
    • Labels:
      None

      Description

      A IllegalLifecycleStateException would be converted to a CacheNotFoundResponse, and the originator would know to retry the command after a topology change.

      Currently it throws RejectedExecutionException when the executor is stopped, which is not handled and causes the originator to fail the operation with a RemoteException.

            java.util.concurrent.ExecutionException: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from ClusterListenerReplInitialStateTest-NodeB-51075, see cause for remote stack trace
      	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205)
      	at org.infinispan.notifications.cachelistener.cluster.ClusterListenerReplTest.testPrimaryOwnerGoesDownBeforeBackupRaisesEvent(ClusterListenerReplTest.java:61)
      	at org.infinispan.commons.test.TestNGLongTestsHook.run(TestNGLongTestsHook.java:24)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from ClusterListenerReplInitialStateTest-NodeB-51075, see cause for remote stack trace
      	at org.infinispan.remoting.transport.ResponseCollectors.wrapRemoteException(ResponseCollectors.java:26)
      	at org.infinispan.remoting.transport.ValidSingleResponseCollector.withException(ValidSingleResponseCollector.java:37)
      	at org.infinispan.remoting.transport.ValidSingleResponseCollector.addResponse(ValidSingleResponseCollector.java:21)
      	at org.infinispan.remoting.transport.impl.SingleTargetRequest.addResponse(SingleTargetRequest.java:72)
      	at org.infinispan.remoting.transport.impl.SingleTargetRequest.onResponse(SingleTargetRequest.java:42)
      	at org.infinispan.remoting.transport.impl.RequestRepository.addResponse(RequestRepository.java:52)
      	at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processResponse(JGroupsTransport.java:1414)
      	at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processMessage(JGroupsTransport.java:1317)
      	at org.infinispan.remoting.transport.jgroups.JGroupsTransport.access$300(JGroupsTransport.java:130)
      	at org.infinispan.remoting.transport.jgroups.JGroupsTransport$ChannelCallbacks.up(JGroupsTransport.java:1462)
      	at org.jgroups.JChannel.up(JChannel.java:775)
      	at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:920)
      	at org.jgroups.protocols.FRAG3.up(FRAG3.java:171)
      	at org.jgroups.protocols.FlowControl.up(FlowControl.java:338)
      	at org.jgroups.protocols.FlowControl.up(FlowControl.java:338)
      	at org.jgroups.protocols.tom.TOA.up(TOA.java:119)
      	at org.jgroups.protocols.pbcast.GMS.up(GMS.java:855)
      	at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:243)
      	at org.jgroups.protocols.UNICAST3.deliverMessage(UNICAST3.java:1049)
      	at org.jgroups.protocols.UNICAST3.addMessage(UNICAST3.java:772)
      	at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:753)
      	at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:405)
      	at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:592)
      	at org.jgroups.protocols.Discovery.up(Discovery.java:300)
      	at org.jgroups.protocols.TP.passMessageUp(TP.java:1275)
      	at org.jgroups.util.SubmitToThreadPool$SingleMessageHandler.run(SubmitToThreadPool.java:87)
      	... 3 more
      	Suppressed: org.infinispan.util.logging.TraceException
      		at org.infinispan.interceptors.impl.SimpleAsyncInvocationStage.get(SimpleAsyncInvocationStage.java:39)
      		at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invoke(AsyncInterceptorChainImpl.java:246)
      		at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1832)
      		at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1355)
      		at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1956)
      		at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:226)
      		at org.infinispan.cache.impl.AbstractDelegatingCache.put(AbstractDelegatingCache.java:450)
      		at org.infinispan.cache.impl.AbstractDelegatingCache.put(AbstractDelegatingCache.java:450)
      		at org.infinispan.cache.impl.AbstractDelegatingCache.put(AbstractDelegatingCache.java:450)
      		at org.infinispan.cache.impl.EncoderCache.put(EncoderCache.java:674)
      		at org.infinispan.notifications.cachelistener.cluster.ClusterListenerReplTest.lambda$testPrimaryOwnerGoesDownBeforeBackupRaisesEvent$0(ClusterListenerReplTest.java:49)
      		at org.infinispan.test.AbstractInfinispanTest$CallableWrapper.call(AbstractInfinispanTest.java:533)
      		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      		... 3 more
      Caused by: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@5bda7780[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@23104330[Wrapped task = org.infinispan.util.ControlledRpcManager$$Lambda$1406/0x0000000100abcc40@5b570e95]] rejected from java.util.concurrent.ScheduledThreadPoolExecutor@a589bd5[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
      	at org.infinispan.marshall.exts.ThrowableExternalizer.readGenericThrowable(ThrowableExternalizer.java:282)
      	at org.infinispan.marshall.exts.ThrowableExternalizer.readObject(ThrowableExternalizer.java:259)
      	at org.infinispan.marshall.exts.ThrowableExternalizer.readObject(ThrowableExternalizer.java:42)
      	at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:728)
      	at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:709)
      	at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:358)
      	at org.infinispan.marshall.core.BytesObjectInput.readObject(BytesObjectInput.java:32)
      	at org.infinispan.remoting.responses.ExceptionResponse$Externalizer.readObject(ExceptionResponse.java:49)
      	at org.infinispan.remoting.responses.ExceptionResponse$Externalizer.readObject(ExceptionResponse.java:41)
      	at org.infinispan.marshall.core.GlobalMarshaller.readWithExternalizer(GlobalMarshaller.java:728)
      	at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:709)
      	at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:358)
      	at org.infinispan.marshall.core.GlobalMarshaller.objectFromObjectInput(GlobalMarshaller.java:192)
      	at org.infinispan.marshall.core.GlobalMarshaller.objectFromByteBuffer(GlobalMarshaller.java:221)
      	at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processResponse(JGroupsTransport.java:1406)
      	... 22 more
      ... Removed 22 stack frames
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                william.burns Will Burns
                Reporter:
                dan.berindei Dan Berindei
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: