Details
-
Bug
-
Resolution: Done
-
Critical
-
5.2.0.Beta2
-
None
Description
I have seen this in NoRpcOnReadonlyTransactionsTest:
18:07:58,765 TRACE (OOB-2,ISPN,NodeE-8639:a) [StateProviderImpl] Transactions were requested by node NodeF-33213 with topology 3, greater than the local topology (1). Waiting for topology 3 to be installed locally. 18:07:58,765 TRACE (OOB-2,ISPN,NodeE-8639:) [InboundInvocationHandlerImpl] Exception executing command java.lang.IllegalArgumentException: Node NodeE-8639 is not a member at org.infinispan.distribution.ch.DefaultConsistentHash.getSegmentsForOwner(DefaultConsistentHash.java:97) at org.infinispan.statetransfer.StateProviderImpl.getTransactionsForSegments(StateProviderImpl.java:203) at org.infinispan.statetransfer.StateRequestCommand.perform(StateRequestCommand.java:88)
The problem is that StateProviderImpl.getSegmentsForOwner uses an older consistent hash "cached" in StateProviderImpl, but the topology id in StateTransferLockImpl has been already updated by StateConsumerImpl.onTopologyUpdate, so calling StateTransferLockImpl.waitForTopology doesn't do anything.
The simplest solution would be to call StateProviderImpl.onTopologyUpdate before StateConsumerImpl.onTopologyUpdate, and it doesn't look like it would cause any problems.