denis-chudov commented on code in PR #3467:
URL: https://github.com/apache/ignite-3/pull/3467#discussion_r1542660847


##########
modules/replicator/src/main/java/org/apache/ignite/internal/replicator/Replica.java:
##########
@@ -196,7 +221,8 @@ private CompletableFuture<LeaseGrantedMessageResponse> 
processLeaseGrantedMessag
                 // Replica must wait till storage index reaches the current 
leader's index to make sure that all updates made on the
                 // group leader are received.
 
-                return 
waitForActualState(msg.leaseExpirationTime().getPhysical())
+                return 
sendPrimaryReplicaChangeToReplicationGroup(msg.leaseStartTime().longValue())
+                        .thenCompose(v -> 
waitForActualState(msg.leaseExpirationTime().getPhysical()))

Review Comment:
   We don't expect any changes within the replication group while there is no 
active lease. I made it in a way that it first makes a write request to the 
group ( sendPrimaryReplicaChangeToReplicationGroup ) and then waits for the 
actual state. Do you think that we should swap these methods?



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