sanpwc commented on code in PR #2883:
URL: https://github.com/apache/ignite-3/pull/2883#discussion_r1408868191
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -3355,32 +3356,20 @@ private CompletableFuture<IgniteBiTuple<RowId,
Collection<Lock>>> takeLocksForRe
* @return Future. The result is not {@code null} only for {@link
ReadOnlyReplicaRequest}. If {@code true}, then replica is primary.
*/
private CompletableFuture<Boolean> ensureReplicaIsPrimary(ReplicaRequest
request) {
- Long expectedTerm;
+ long expectedTerm;
- // TODO: IGNITE-20875 Add enlistment consistency token to
PrimaryReplicaTestRequest interface.
- if (request instanceof ReadWriteReplicaRequest) {
- expectedTerm = ((ReadWriteReplicaRequest) request).term();
-
- assert expectedTerm != null;
- } else if (request instanceof TxFinishReplicaRequest) {
- expectedTerm = ((TxFinishReplicaRequest) request).term();
+ if (request instanceof PrimaryReplicaRequest) {
+ expectedTerm = ((PrimaryReplicaRequest)
request).enlistmentConsistencyToken();
Review Comment:
It's not longer expected**Term** but rather an
expectedEnlistmentConsistencyToken, right?
Same for variable declaration.
--
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]