private void nodeNotOwnsBackup ( InternalPartitionImpl partition ) { int partitionId = getPartitionId ( ) ; int replicaIndex = getReplicaIndex ( ) ; NodeEngine nodeEngine = getNodeEngine ( ) ; ILogger logger = getLogger ( ) ; if ( logger . isFinestEnabled ( ) ) { int currentReplicaIndex = partition . getReplicaIndex ( PartitionReplica . from ( nodeEngine . getLocalMember ( ) ) ) ; logger . finest ( "This node is not backup replica of partitionId=" + partitionId + ", replicaIndex=" + replicaIndex + " anymore. current replicaIndex=" + currentReplicaIndex ) ; } if ( operations != null ) { PartitionReplica replica = partition . getReplica ( replicaIndex ) ; Member targetMember = null ; if ( replica != null ) { ClusterServiceImpl clusterService = ( ClusterServiceImpl ) nodeEngine . getClusterService ( ) ; targetMember = clusterService . getMember ( replica . address ( ) , replica . uuid ( ) ) ; } Throwable throwable = new WrongTargetException ( nodeEngine . getLocalMember ( ) , targetMember , partitionId , replicaIndex , getClass ( ) . getName ( ) ) ; for ( Operation op : operations ) { prepareOperation ( op ) ; onOperationFailure ( op , throwable ) ; } } }
Fail all replication operations with the exception that this node is no longer the replica with the sent index