vldpyatkov commented on code in PR #4798:
URL: https://github.com/apache/ignite-3/pull/4798#discussion_r1867969010


##########
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/LeaseUpdater.java:
##########
@@ -535,6 +542,24 @@ private void updateLeaseBatchInternal() {
                 );
             }
 
+            leasesCurrent.leaseByGroupId().forEach(renewedLeases::putIfAbsent);
+
+            for (Iterator<Entry<ReplicationGroupId, Lease>> iter = 
renewedLeases.entrySet().iterator(); iter.hasNext(); ) {
+                Map.Entry<ReplicationGroupId, Lease> entry = iter.next();
+                ReplicationGroupId groupId = entry.getKey();
+                Lease lease = entry.getValue();
+
+                if (clockService.before(lease.getExpirationTime(), currentTime)
+                        && 
!groupsAmongCurrentStableAndPendingAssignments.contains(groupId)) {
+                    iter.remove();
+                } else if (prolongableLeaseGroupIds.contains(groupId)
+                        && 
!lease.getExpirationTime().equals(newExpirationTimestamp)) {

Review Comment:
   The last condition is useless because the first 
(`prolongableLeaseGroupIds.contains(groupId)`) already filters these entries.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to