denis-chudov commented on code in PR #2141:
URL: https://github.com/apache/ignite-3/pull/2141#discussion_r1251263730
##########
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/LeaseUpdater.java:
##########
@@ -305,14 +328,33 @@ public void run() {
// leaseholders at all.
if (isLeaseOutdated(lease)) {
// New lease is granting.
- writeNewLeaseInMetaStorage(grpId, lease,
candidate);
+ writeNewLeaseInMetaStorage(grpId, lease,
candidate, renewedLeases, toBeNegotiated);
} else if (lease.isProlongable() &&
candidate.name().equals(lease.getLeaseholder())) {
// Old lease is renewing.
- prolongLeaseInMetaStorage(grpId, lease);
+ prolongLeaseInMetaStorage(grpId, lease,
renewedLeases);
}
}
}
+ byte[] renewedValue = new
LeaseBatch(renewedLeases.values()).bytes();
+
+ var key = PLACEMENTDRIVER_LEASES_KEY;
+
+ msManager.invoke(
+ or(notExists(key), value(key).eq(new
LeaseBatch(leaseTracker.leasesCurrent()).bytes())),
Review Comment:
what exactly do you suggest?
--
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]