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


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java:
##########
@@ -194,6 +208,27 @@ public PartitionListener(
         }
     }
 
+    private boolean shouldApplyLog(boolean isFull, LeaseInfo storageLeaseInfo) 
{
+        if (isFull) {
+            return true;
+        }
+
+        HybridTimestamp currentTime = clockService.current();
+
+        if (lastKnownLease == null || 
lastKnownLease.getExpirationTime().compareTo(currentTime) < 0) {
+            ReplicationGroupId groupId = new 
TablePartitionId(storage.tableId(), storage.partitionId());
+            lastKnownLease = placementDriver.getCurrentPrimaryReplica(groupId, 
currentTime);
+        }
+
+        if (lastKnownLease == null
+                || !lastKnownLease.getLeaseholderId().equals(localNodeId)
+                || lastKnownLease.getExpirationTime().compareTo(currentTime) < 
0) {

Review Comment:
   removed



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