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

StateProviderImpl.getTransactionsForSegments can fail with an IllegalStateException

    XMLWordPrintable

Details

    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.

      Attachments

        Activity

          People

            anistor Adrian Nistor
            dberinde@redhat.com Dan Berindei
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: