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

Transaction boundary commands are not forwarded during state transfer

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Critical
    • 5.2.0.Beta2
    • 5.2.0.Beta1
    • State Transfer
    • None

    Description

      Two issues:
      1. StateTransferInterceptor.handleTxCommand, when invoking handleTopologyAffectedCommand internally, wrongly calculates the 2nd param of the invocation
      2. StateTransferInterceptor.handleTopologyAffectedCommand
      This logic filters out commands that should be forwarded (e.g. late commands that happened before state transfer completed):

                  if (pendingCh != null && cmdTopologyId < localTopologyId + 1) {
                     ConsistentHash writeCh = cacheTopology.getWriteConsistentHash();
                     Set<Object> affectedKeys = getAffectedKeys(ctx, command);
                     Set<Address> newTargets = writeCh.locateAllOwners(affectedKeys);
                     newTargets.remove(rpcManager.getAddress());
                     if (!newTargets.isEmpty()) {
                        // Update the topology id to prevent cycles
                        command.setTopologyId(localTopologyId);
                        log.tracef("Forwarding command %s to new targets %s", command, newTargets);
                        // TODO find a way to forward the command async if it was received async
                        rpcManager.invokeRemotely(newTargets, command, true, false);
                     }
                  }
      
      

      The if above should be removed.

      Attachments

        Activity

          People

            mircea.markus Mircea Markus (Inactive)
            mircea.markus Mircea Markus (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: