Details
-
Enhancement
-
Resolution: Done
-
Critical
-
5.2.0.Beta1
-
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.