kgusakov commented on code in PR #1946:
URL: https://github.com/apache/ignite-3/pull/1946#discussion_r1170166264


##########
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/LeaseUpdater.java:
##########
@@ -210,16 +217,35 @@ public void run() {
 
                     Lease lease = leaseTracker.getLease(grpId);
 
+                    if (!lease.isAccepted()) {
+                        LeaseAgreement agreement = 
leaseNegotiator.negotiated(grpId);
+
+                        if (agreement.isAccepted()) {
+                            publishLease(grpId, lease);
+
+                            continue;
+                        } else if (agreement.ready()) {
+                            ClusterNode candidate = 
nextLeaseHolder(entry.getValue(), agreement.getRedirectTo());
+
+                            if (candidate == null) {
+                                continue;
+                            }
+
+                            // New lease is granting.
+                            writeNewLeasInMetaStorage(grpId, lease, candidate);

Review Comment:
   Not sure, that I understand: why don't we need to get acceptance from the 
`agreement.getRedirectTo` replica in this case?



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