denis-chudov commented on code in PR #3467:
URL: https://github.com/apache/ignite-3/pull/3467#discussion_r1547712635
##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/exception/PrimaryReplicaMissException.java:
##########
@@ -28,6 +30,17 @@
public class PrimaryReplicaMissException extends IgniteInternalException
implements ExpectedReplicationException {
private static final long serialVersionUID = 8755220779942651494L;
+ /**
+ * Constructor.
+ *
+ * @param txId Transaction id.
+ * @param expectedEnlistmentConsistencyToken Expected enlistment
consistency token, {@code null} if absent.
+ */
+ public PrimaryReplicaMissException(UUID txId, Long
expectedEnlistmentConsistencyToken) {
+ super(REPLICA_MISS_ERR, format("The primary replica has changed
[txId={}, expectedEnlistmentConsistencyToken={}].",
Review Comment:
done
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java:
##########
@@ -577,6 +601,22 @@ void handleBuildIndexCommand(BuildIndexCommand cmd, long
commandIndex, long comm
}
}
+ /**
+ * Handler for {@link PrimaryReplicaChangeCommand}.
+ *
+ * @param cmd Command.
+ * @param commandIndex Command index.
+ * @param commandTerm Command term.
+ */
+ private void handlePrimaryReplicaChangeCommand(PrimaryReplicaChangeCommand
cmd, long commandIndex, long commandTerm) {
+ // Skips the write command because the storage has already executed it.
+ if (commandIndex <= storage.lastAppliedIndex()) {
+ return;
+ }
+
+ txStateStorage.updateLease(cmd.leaseStartTime());
Review Comment:
fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]