alievmirza commented on code in PR #7931:
URL: https://github.com/apache/ignite-3/pull/7931#discussion_r3050501558


##########
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/LeaseUpdater.java:
##########
@@ -779,6 +779,20 @@ private void processMessageInternal(String sender, 
PlacementDriverActorMessage m
                             clusterService.messagingService().respond(sender, 
response, correlationId);
                         }
                     });
+                } else {
+                    long time = lease.getLeaseholderId() == null
+                            ? clockService.current().longValue()
+                            : NULL_HYBRID_TIMESTAMP;
+
+                    LOG.info("Stop lease prolongation message was received 
from non-leaseholder "
+                                    + "[groupId={}, sender={}, leaseholder={}, 
time={}]", grpId, sender, lease.getLeaseholder(), time);
+
+                    StopLeaseProlongationMessageResponse response = 
PLACEMENT_DRIVER_MESSAGES_FACTORY
+                            .stopLeaseProlongationMessageResponse()
+                            .deniedLeaseExpirationTimeLong(time)
+                            .build();
+
+                    clusterService.messagingService().respond(sender, 
response, correlationId);

Review Comment:
   what if `correlationId` is null?



##########
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/LeaseUpdater.java:
##########
@@ -779,6 +779,20 @@ private void processMessageInternal(String sender, 
PlacementDriverActorMessage m
                             clusterService.messagingService().respond(sender, 
response, correlationId);
                         }
                     });
+                } else {
+                    long time = lease.getLeaseholderId() == null
+                            ? clockService.current().longValue()
+                            : NULL_HYBRID_TIMESTAMP;

Review Comment:
   could you please explain why we return `NULL_HYBRID_TIMESTAMP`? Why not 
`lease.getExpirationTime().longValue()`?



##########
modules/rest/build.gradle:
##########
@@ -97,6 +97,7 @@ dependencies {
     integrationTestImplementation project(':ignite-table')
     integrationTestImplementation project(':ignite-transactions')
     integrationTestImplementation project(':ignite-eventlog')
+    integrationTestImplementation project(':ignite-placement-driver-api')

Review Comment:
   do we really need this?



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