[JBoss JIRA] (ISPN-3120) StateConsumerImpl can ignore state received during a rebalance
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-3120?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-3120:
--------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
Integrated in master and 5.2.x. Thanks!
> StateConsumerImpl can ignore state received during a rebalance
> --------------------------------------------------------------
>
> Key: ISPN-3120
> URL: https://issues.jboss.org/browse/ISPN-3120
> Project: Infinispan
> Issue Type: Bug
> Components: State transfer
> Affects Versions: 5.3.0.Beta1
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Priority: Critical
> Labels: 5.2.x
> Fix For: 5.2.7.Final, 5.3.0.CR1, 5.3.0.Final
>
>
> This causes random failures in ConcurrentOverlappingLeaveTest and ConcurrentNonOverlappingLeaveTest.
> 1. Starting with a 4-node cluster: [E, F, G, H] (topology 7).
> 2. F leaves, and E sends a REBALANCE_START command with nodes [E, G, H] (topology 8). Some segments are owned by [H] in the current CH and by [H, G] in the pending CH.
> 3. E reports that it finished receiving state with a REBAlANCE_CONFIRM command.
> 4. H leaves, and E sends a CH_UPDATE command with nodes [E, G] (topology 9).
> The segments that were owned by [H] in the previous currentCH are assigned to [E, G] in the new currentCH (otherwise they wouldn't have any owners).
> 5. The StateConsumerImpl on E requests state for the "lost" segments from G.
> 6. G confirms the end of the rebalance as well, and E sends a CH_UPDATE command to end the rebalance (topology 10).
> 7. E sends a REBALANCE_START command to assign all segments for [E, G] (topology 11).
> 8. While the StateConsumerImpl on E is starting the state transfer, it also receives a StateResponseCommand for the lost segments from G.
> 9. Because the structures keeping track of the received state are not properly initialized, E considers it finished receiving state for topology 11.
> 10. E receives a StateResponseCommand from G with actual data, but it ignores it because {{StateConsumerImpl.updatedKeys == null}}.
> {noformat}
> 11:30:39,807 DEBUG (transport-thread-4,NodeE:dist) [LocalTopologyManagerImpl] Updating local consistent hash(es) for cache dist: new topology = CacheTopology{id=7, currentCH=DefaultConsistentHash{numSegments=60, numOwners=2, members=[NodeE-51027, NodeG-6339, NodeH-47370]}, pendingCH=null}
> 11:30:39,810 DEBUG (transport-thread-3,NodeE:dist) [LocalTopologyManagerImpl] Starting local rebalance for cache dist, topology = CacheTopology{id=8, currentCH=DefaultConsistentHash{numSegments=60, numOwners=2, members=[NodeE-51027, NodeG-6339, NodeH-47370]}, pendingCH=DefaultConsistentHash{numSegments=60, numOwners=2, members=[NodeE-51027, NodeG-6339, NodeH-47370]}}
> 11:30:39,817 DEBUG (transport-thread-3,NodeE:dist) [StateConsumerImpl] Finished receiving of segments for cache dist for topology 8.
> 11:30:39,832 DEBUG (transport-thread-4,NodeE:dist) [LocalTopologyManagerImpl] Updating local consistent hash(es) for cache dist: new topology = CacheTopology{id=9, currentCH=DefaultConsistentHash{numSegments=60, numOwners=2, members=[NodeE-51027, NodeG-6339]}, pendingCH=DefaultConsistentHash{numSegments=60, numOwners=2, members=[NodeE-51027, NodeG-6339]}}
> 11:30:39,834 DEBUG (transport-thread-4,NodeE:dist) [StateConsumerImpl] Adding inbound state transfer for segments [38, 36, 47, 44, 45] of cache dist
> 11:30:39,853 DEBUG (transport-thread-3,NodeE:dist) [LocalTopologyManagerImpl] Starting local rebalance for cache dist, topology = CacheTopology{id=11, currentCH=DefaultConsistentHash{numSegments=60, numOwners=2, members=[NodeE-51027, NodeG-6339]}, pendingCH=DefaultConsistentHash{numSegments=60, numOwners=2, members=[NodeE-51027, NodeG-6339]}}
> 11:30:39,859 TRACE (remote-thread-1,NodeE:) [InboundInvocationHandlerImpl] Calling perform() on StateResponseCommand{cache=dist, origin=NodeG-6339, topologyId=9}
> 11:30:39,864 DEBUG (remote-thread-1,NodeE:dist) [StateConsumerImpl] Finished receiving of segments for cache dist for topology 11.
> 11:30:39,866 TRACE (transport-thread-5,NodeE:dist) [LocalTopologyManagerImpl] Ignoring consistent hash update 10 for cache dist, we have already received a newer topology 11
> 11:30:39,868 TRACE (remote-thread-1,NodeE:) [InboundInvocationHandlerImpl] Calling perform() on StateResponseCommand{cache=dist, origin=NodeG-6339, topologyId=11}
> 11:30:39,872 TRACE (remote-thread-1,NodeE:dist dist) [EntryWrappingInterceptor] State transfer will not write key/value MagicKey#k3{672f69c9@NodeG-6339}/v3 because it was already updated by somebody else
> 11:30:40,582 ERROR (testng-ConcurrentNonOverlappingLeaveTest:) [UnitTestTestNGListener] Test testTransactional(org.infinispan.distribution.rehash.ConcurrentNonOverlappingLeaveTest) failed.
> java.lang.AssertionError: Fail on owner cache NodeE-51027: dc.get(MagicKey#k3{672f69c9@NodeG-6339}) returned null!
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (ISPN-2582) When a node rejoins a cluster , the existing node freezes for a minute
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-2582?page=com.atlassian.jira.plugin.... ]
Dan Berindei resolved ISPN-2582.
--------------------------------
Fix Version/s: 5.2.6.Final
Resolution: Out of Date
We have removed CacheViewsManagerImpl in the 5.2.x releases.
> When a node rejoins a cluster , the existing node freezes for a minute
> ----------------------------------------------------------------------
>
> Key: ISPN-2582
> URL: https://issues.jboss.org/browse/ISPN-2582
> Project: Infinispan
> Issue Type: Bug
> Environment: EAP 6.0.0.GA
> Reporter: Shay Matasaro
> Assignee: Mircea Markus
> Fix For: 5.2.6.Final
>
>
> 1) 2 node cluster
> 2) distributable web app
> 3) run jemeter with 10 threads
> 4) start node 1
> 5) start node 2
> 6) shutdown node 1
> 7) restart node 1
> result:
> node 2 freezes for one minute then throws exceptions exceptions then continues
> 15:25:19,478 ERROR [org.infinispan.cacheviews.CacheViewsManagerImpl] (CacheViewInstaller-5,master:server-two/web) ISPN000172: Failed to prepare view CacheView{viewId=4, members=[master:server-two/web, master:server-one/web]} for cache default-host/demo7, rolling back to view CacheView{viewId=3, members=[master:server-two/web]}: java.util.concurrent.TimeoutException
> 15:25:19,688 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (ajp-/0.0.0.0:8159-3) ISPN000136: Execution error: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,687 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (ajp-/0.0.0.0:8159-6) ISPN000136: Execution error: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,687 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (ajp-/0.0.0.0:8159-1) ISPN000136: Execution error: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,688 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (ajp-/0.0.0.0:8159-9) ISPN000136: Execution error: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,685 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (ajp-/0.0.0.0:8159-2) ISPN000136: Execution error: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,688 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (ajp-/0.0.0.0:8159-5) ISPN000136: Execution error: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,686 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (ajp-/0.0.0.0:8159-4) ISPN000136: Execution error: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,688 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (ajp-/0.0.0.0:8159-10) ISPN000136: Execution error: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,688 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (ajp-/0.0.0.0:8159-12) ISPN000136: Execution error: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,696 ERROR [org.infinispan.transaction.TransactionCoordinator] (ajp-/0.0.0.0:8159-3) ISPN000097: Error while processing a prepare in a single-phase transaction: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,689 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (ajp-/0.0.0.0:8159-11) ISPN000136: Execution error: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,705 ERROR [org.infinispan.transaction.TransactionCoordinator] (ajp-/0.0.0.0:8159-4) ISPN000097: Error while processing a prepare in a single-phase transaction: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,706 ERROR [org.infinispan.transaction.TransactionCoordinator] (ajp-/0.0.0.0:8159-10) ISPN000097: Error while processing a prepare in a single-phase transaction: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,699 ERROR [org.infinispan.transaction.TransactionCoordinator] (ajp-/0.0.0.0:8159-1) ISPN000097: Error while processing a prepare in a single-phase transaction: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,696 ERROR [org.infinispan.transaction.TransactionCoordinator] (ajp-/0.0.0.0:8159-6) ISPN000097: Error while processing a prepare in a single-phase transaction: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,714 ERROR [org.infinispan.transaction.tm.DummyTransaction] (ajp-/0.0.0.0:8159-10) ISPN000111: afterCompletion() failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, transaction=DummyTransaction{xid=DummyXid{id=34869}, status=3}, lockedKeys=null, backupKeyLocks=null, viewId=3} org.infinispan.transaction.synchronization.SyncLocalTransaction@8834} org.infinispan.transaction.synchronization.SynchronizationAdapter@8853: org.infinispan.CacheException: Could not commit.
> Caused by: javax.transaction.xa.XAException
> 15:25:19,708 ERROR [org.infinispan.transaction.tm.DummyTransaction] (ajp-/0.0.0.0:8159-3) ISPN000111: afterCompletion() failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, transaction=DummyTransaction{xid=DummyXid{id=34867}, status=3}, lockedKeys=null, backupKeyLocks=null, viewId=3} org.infinispan.transaction.synchronization.SyncLocalTransaction@8832} org.infinispan.transaction.synchronization.SynchronizationAdapter@8851: org.infinispan.CacheException: Could not commit.
> Caused by: javax.transaction.xa.XAException
> 15:25:19,717 ERROR [org.infinispan.transaction.tm.DummyTransaction] (ajp-/0.0.0.0:8159-6) ISPN000111: afterCompletion() failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, transaction=DummyTransaction{xid=DummyXid{id=34864}, status=3}, lockedKeys=null, backupKeyLocks=null, viewId=3} org.infinispan.transaction.synchronization.SyncLocalTransaction@882f} org.infinispan.transaction.synchronization.SynchronizationAdapter@884e: org.infinispan.CacheException: Could not commit.
> Caused by: javax.transaction.xa.XAException
> 15:25:19,699 ERROR [org.infinispan.transaction.TransactionCoordinator] (ajp-/0.0.0.0:8159-9) ISPN000097: Error while processing a prepare in a single-phase transaction: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,704 ERROR [org.infinispan.transaction.TransactionCoordinator] (ajp-/0.0.0.0:8159-5) ISPN000097: Error while processing a prepare in a single-phase transaction: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,707 ERROR [org.infinispan.transaction.TransactionCoordinator] (ajp-/0.0.0.0:8159-12) ISPN000097: Error while processing a prepare in a single-phase transaction: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,704 ERROR [org.infinispan.transaction.TransactionCoordinator] (ajp-/0.0.0.0:8159-2) ISPN000097: Error while processing a prepare in a single-phase transaction: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,722 ERROR [org.infinispan.transaction.tm.DummyTransaction] (ajp-/0.0.0.0:8159-5) ISPN000111: afterCompletion() failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, transaction=DummyTransaction{xid=DummyXid{id=34866}, status=3}, lockedKeys=null, backupKeyLocks=null, viewId=3} org.infinispan.transaction.synchronization.SyncLocalTransaction@8831} org.infinispan.transaction.synchronization.SynchronizationAdapter@8850: org.infinispan.CacheException: Could not commit.
> Caused by: javax.transaction.xa.XAException
> 15:25:19,721 ERROR [org.infinispan.transaction.tm.DummyTransaction] (ajp-/0.0.0.0:8159-9) ISPN000111: afterCompletion() failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, transaction=DummyTransaction{xid=DummyXid{id=34870}, status=3}, lockedKeys=null, backupKeyLocks=null, viewId=3} org.infinispan.transaction.synchronization.SyncLocalTransaction@8835} org.infinispan.transaction.synchronization.SynchronizationAdapter@8854: org.infinispan.CacheException: Could not commit.
> Caused by: javax.transaction.xa.XAException
> 15:25:19,712 ERROR [org.infinispan.transaction.TransactionCoordinator] (ajp-/0.0.0.0:8159-11) ISPN000097: Error while processing a prepare in a single-phase transaction: org.infinispan.statetransfer.StateTransferInProgressException: Timed out waiting for the state transfer lock, state transfer in progress for view 4
> 15:25:19,723 ERROR [org.infinispan.transaction.tm.DummyTransaction] (ajp-/0.0.0.0:8159-12) ISPN000111: afterCompletion() failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, transaction=DummyTransaction{xid=DummyXid{id=34868}, status=3}, lockedKeys=null, backupKeyLocks=null, viewId=3} org.infinispan.transaction.synchronization.SyncLocalTransaction@8833} org.infinispan.transaction.synchronization.SynchronizationAdapter@8852: org.infinispan.CacheException: Could not commit.
> Caused by: javax.transaction.xa.XAException
> 15:25:19,712 ERROR [org.infinispan.transaction.tm.DummyTransaction] (ajp-/0.0.0.0:8159-4) ISPN000111: afterCompletion() failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, transaction=DummyTransaction{xid=DummyXid{id=34863}, status=3}, lockedKeys=null, backupKeyLocks=null, viewId=3} org.infinispan.transaction.synchronization.SyncLocalTransaction@882e} org.infinispan.transaction.synchronization.SynchronizationAdapter@884d: org.infinispan.CacheException: Could not commit.
> Caused by: javax.transaction.xa.XAException
> 15:25:19,724 ERROR [org.infinispan.transaction.tm.DummyTransaction] (ajp-/0.0.0.0:8159-2) ISPN000111: afterCompletion() failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, transaction=DummyTransaction{xid=DummyXid{id=34862}, status=3}, lockedKeys=null, backupKeyLocks=null, viewId=3} org.infinispan.transaction.synchronization.SyncLocalTransaction@882d} org.infinispan.transaction.synchronization.SynchronizationAdapter@884c: org.infinispan.CacheException: Could not commit.
> Caused by: javax.transaction.xa.XAException
> 15:25:19,715 ERROR [org.infinispan.transaction.tm.DummyTransaction] (ajp-/0.0.0.0:8159-1) ISPN000111: afterCompletion() failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, transaction=DummyTransaction{xid=DummyXid{id=34865}, status=3}, lockedKeys=null, backupKeyLocks=null, viewId=3} org.infinispan.transaction.synchronization.SyncLocalTransaction@8830} org.infinispan.transaction.synchronization.SynchronizationAdapter@884f: org.infinispan.CacheException: Could not commit.
> Caused by: javax.transaction.xa.XAException
> 15:25:19,726 ERROR [org.infinispan.transaction.tm.DummyTransaction] (ajp-/0.0.0.0:8159-11) ISPN000111: afterCompletion() failed for SynchronizationAdapter{localTransaction=LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, transaction=DummyTransaction{xid=DummyXid{id=34871}, status=3}, lockedKeys=null, backupKeyLocks=null, viewId=3} org.infinispan.transaction.synchronization.SyncLocalTransaction@8836} org.infinispan.transaction.synchronization.SynchronizationAdapter@8855: org.infinispan.CacheException: Could not commit.
> Caused by: javax.transaction.xa.XAException
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (ISPN-2802) Cache recovery fails due to missing responses
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-2802?page=com.atlassian.jira.plugin.... ]
Dan Berindei commented on ISPN-2802:
------------------------------------
[~rvansa] Any updates? Hve you managed to get a snapshot of the OOB thread pool?
> Cache recovery fails due to missing responses
> ---------------------------------------------
>
> Key: ISPN-2802
> URL: https://issues.jboss.org/browse/ISPN-2802
> Project: Infinispan
> Issue Type: Bug
> Components: State transfer
> Affects Versions: 5.2.0.CR3
> Reporter: Radim Vansa
> Assignee: Dan Berindei
> Fix For: 5.3.0.CR1, 5.3.0.Final
>
>
> When the cache recovery is started, the new coordinator sends CacheTopologyControlCommand.GET_STATUS to all nodes and waits for responses. However, I have a reproducible test-case where it always times out waiting for the responses.
> Here are the logs (TRACE is not doable here, but I added some byteman traces - see topology.btm in the archive): http://dl.dropbox.com/u/103079234/recovery.zip
> The problematic spot is on node3 at 05:37:57 receiving cluster view 34.
> All nodes (except the one which is killed, in this case node1) respond quickly to the GET_STATUS command (see BYTEMAN Receiving - Received pairs, these are bound to command execution in CommandAwareRpcDispatcher), but some responses are not received on node3 (look for Receiving rsp bound to GroupRequest).
> JGroups tracing could be useful here but it is not available (intensive logging often blocks on internal log4j locks and the node becomes unresponsive).
> As mentioned above, the case is reproducible, therefore if you can suggest any particular BYTEMAN hook, I can try it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (ISPN-2786) ThreadLocal memory leak in Tomcat
by Galder Zamarreño (JIRA)
[ https://issues.jboss.org/browse/ISPN-2786?page=com.atlassian.jira.plugin.... ]
Galder Zamarreño commented on ISPN-2786:
----------------------------------------
[~dan.berindei], I disagree. I was able to replicate the thread local leak of AbstractJBossMarshaller in the test (after shutdown, the thread local was still there), and fixed with my fix.
> ThreadLocal memory leak in Tomcat
> ---------------------------------
>
> Key: ISPN-2786
> URL: https://issues.jboss.org/browse/ISPN-2786
> Project: Infinispan
> Issue Type: Bug
> Components: Marshalling, Transactions
> Affects Versions: 5.1.8.Final
> Reporter: Johann Burkard
> Assignee: Galder Zamarreño
> Labels: leak, local, memory, thread, threadlocal
> Fix For: 5.3.0.Final
>
>
> Just started an app using Infinispan 5.1.8.Final on Tomcat and got a few ThreadLocal problems during un-deployment:
> (Shortened)
> {code}
> key=org.jboss.marshalling.UTFUtils.BytesHolder
> value=org.jboss.marshalling.UTFUtils$BytesHolder@697a1686
> key=java.lang.ThreadLocal@36ed5ba6
> value=org.infinispan.context.SingleKeyNonTxInvocationContext{flags=null}
> key=org.infinispan.marshall.jboss.AbstractJBossMarshaller$1
> value=org.infinispan.marshall.jboss.AbstractJBossMarshaller$1@75f10df7
> value=org.infinispan.marshall.jboss.AbstractJBossMarshaller.PerThreadInstanceHolder
> {code}
> I do call {{DefaultCacheManager#shutdown()}} during un-deployment. :)
> Thanks
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (ISPN-3141) Conditional commands with Flag.IGNORE_RETURN_VALUES cause NPEs
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-3141?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-3141:
--------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
Integrated in master. Thanks!
> Conditional commands with Flag.IGNORE_RETURN_VALUES cause NPEs
> ---------------------------------------------------------------
>
> Key: ISPN-3141
> URL: https://issues.jboss.org/browse/ISPN-3141
> Project: Infinispan
> Issue Type: Bug
> Components: Core API
> Affects Versions: 5.2.6.Final
> Reporter: Mircea Markus
> Assignee: Mircea Markus
> Labels: 5.2.x
> Fix For: 5.3.0.CR1, 5.3.0.Final
>
>
> The root cause of the exception below is:
> - when Flag.IGNORE_RETURN_VALUES is used the node on which the operation is executed returns NULL
> - the operation being conditional return boolean to the user. The null above is unboxed to a boolean which causes a NPE
> The solution is to ignore the Flag.IGNORE_RETURN_VALUES for conditional operations (remove(k, prevValue) replace(k, prevValue,newValue)) and return the result of the operation: this is a boolean, so the network payload is the same as for null.
> {quote}
> 14:07:57,149 WARN [org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher] (Incoming-2,shared=tcp) ISPN000071: Caught exception when handling command SingleRpcCommand{cacheName='default', command=ReplaceCommand{key=name, oldValue=[B0x42656c61..(4), newValue=[B0x42656c61..(4), metadata=MimeMetadata(text/plain; charset=UTF-8,-1,SECONDS,-1,SECONDS,null,null), flags=null, successful=true, ignorePreviousValue=false}}: java.lang.NullPointerException
> at org.infinispan.CacheImpl.replaceInternal(CacheImpl.java:880)
> at org.infinispan.CacheImpl.replace(CacheImpl.java:871)
> at org.infinispan.DecoratedCache.replace(DecoratedCache.java:551)
> at org.infinispan.xsite.BackupReceiverImpl$BackupCacheUpdater.visitReplaceCommand(BackupReceiverImpl.java:113)
> at org.infinispan.commands.write.ReplaceCommand.acceptVisitor(ReplaceCommand.java:76)
> at org.infinispan.xsite.BackupReceiverImpl.handleRemoteCommand(BackupReceiverImpl.java:76)
> at org.infinispan.xsite.BackupReceiverRepositoryImpl.handleRemoteCommand(BackupReceiverRepositoryImpl.java:87)
> at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.executeCommandFromRemoteSite(CommandAwareRpcDispatcher.java:255)
> at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:230)
> at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:460) [jgroups-3.3.0.CR2.jar:3.3.0.CR2]
> at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:377) [jgroups-3.3.0.CR2.jar:3.3.0.CR2]
> at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:247) [jgroups-3.3.0.CR2.jar:3.3.0.CR2]
> at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:665) [jgroups-3.3.0.CR2.jar:3.3.0.CR2]
> at org.jgroups.blocks.mux.MuxUpHandler.up(MuxUpHandler.java:130) [jgroups-3.3.0.CR2.jar:3.3.0.CR2]
> at org.jgroups.JChannel.up(JChannel.java:719) [jgroups-3.3.0.CR2.jar:3.3.0.CR2]
> at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1008) [jgroups-3.3.0.CR2.jar:3.3.0.CR2]
> at org.jgroups.protocols.relay.RELAY2.deliver(RELAY2.java:607) [jgroups-3.3.0.CR2.jar:3.3.0.CR2]
> at org.jgroups.protocols.relay.RELAY2.route(RELAY2.java:507) [jgroups-3.3.0.CR2.jar:3.3.0.CR2]
> at org.jgroups.protocols.relay.RELAY2.handleMessage(RELAY2.java:482) [jgroups-3.3.0.CR2.jar:3.3.0.CR2]
> at org.jgroups.protocols.relay.RELAY2.handleRelayMessage(RELAY2.java:463) [jgroups-3.3.0.CR2.jar:3.3.0.CR2]
> at org.jgroups.protocols.relay.Relayer$Bridge.receive(Relayer.java:302) [jgroups-3.3.0.CR2.jar:3.3.0.CR2]
> at org.jgroups.JChannel.up(JChannel.java:749) [jgroups-3.3.0.CR2.jar:3.3.0.CR2]
> at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1012) [jgroups-3.3.0.CR2.jar:3.3.0.CR2]
> {quote}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months