sanpwc commented on code in PR #2701:
URL: https://github.com/apache/ignite-3/pull/2701#discussion_r1363356550


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/replicator/PartitionReplicaListener.java:
##########
@@ -2653,6 +2653,8 @@ private CompletableFuture<Boolean> 
ensureReplicaIsPrimary(ReplicaRequest request
             expectedTerm = ((ReadOnlyDirectReplicaRequest) 
request).enlistmentConsistencyToken();
 
             assert expectedTerm != null;
+        } else if (request instanceof BuildIndexReplicaRequest) {
+            expectedTerm = ((BuildIndexReplicaRequest) 
request).enlistmentConsistencyToken();

Review Comment:
   Well, such approach is incorrect. Index builder should gracefully handle 
such exceptions by retrying await -> send -> get flow. Or it's possible to 
retry it with on become primary events. However PrimaryReplicaMiss is not an 
error from the IndexBuilder and should not be logged as error or even warn. 
It's possible to log it as debug or similar though.



-- 
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]

Reply via email to