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


##########
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/LeaseUpdater.java:
##########
@@ -500,19 +492,23 @@ private void updateLeaseBatchInternal() {
                         && lease.isProlongable()
                         && candidate != null && 
candidate.id().equals(lease.getLeaseholderId());
 
-                // The lease is expired or close to this.
+                // The lease is expired or close to this, trying to prolong if 
possible or create a new one.
                 if (lease.getExpirationTime().getPhysical() < 
outdatedLeaseThreshold) {
-                    // If we couldn't find a candidate neither stable nor 
pending assignments set, so update stats and skip iteration
+                    boolean isLeaseOutdated = isLeaseOutdated(lease);
+
+                    // If we couldn't find a candidate neither stable nor 
pending assignments set, so skip iteration.
                     if (candidate == null) {
-                        leaseWithoutCandidateCount++;
+                        logGroupWithoutCandidateOnce(grpId, isLeaseOutdated, 
stableAssignments, pendingAssignments);
 
                         continue;
                     }
 
                     // We can't prolong the expired lease because we already 
have an interval of time when the lease was not active,
                     // so we must start a negotiation round from the 
beginning; the same we do for the groups that don't have
                     // leaseholders at all.
-                    if (isLeaseOutdated(lease)) {
+                    if (isLeaseOutdated) {
+                        LOG.info("Lease is expired, creating a new one 
[groupId={}, lease={}, candidate={}]", grpId, lease, candidate);

Review Comment:
   No, anyway we print `Received LeaseGrantMessage` and `Lease accepted` on 
replicas on lease negotiation, and the partition count is usually limited, and 
massive lease expiration is exceptional 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