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


##########
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/leases/Lease.java:
##########
@@ -153,10 +151,10 @@ public Lease acceptLease(HybridTimestamp to) {
      *
      * @return Denied lease.
      */
-    public Lease denyLease(String proposedCandidate) {
-        assert accepted : "The lease is not accepted: " + this;
+    public Lease denyLease(@Nullable String proposedCandidate) {
+        HybridTimestamp newExpirationTime = accepted ? expirationTime : new 
HybridTimestamp(System.currentTimeMillis(), 0);
 
-        return new Lease(leaseholder, leaseholderId, startTime, 
expirationTime, false, true, proposedCandidate, replicationGroupId);
+        return new Lease(leaseholder, leaseholderId, startTime, 
newExpirationTime, false, accepted, proposedCandidate, replicationGroupId);

Review Comment:
   The accepted flag should be set to true.



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