fapaul commented on a change in pull request #15288:
URL: https://github.com/apache/flink/pull/15288#discussion_r598491819



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/DeclarativeSlotManager.java
##########
@@ -554,7 +555,10 @@ private void allocateSlot(
         CompletableFuture<Void> slotAllocationResponseProcessingFuture =
                 requestFuture.handleAsync(
                         (Acknowledge acknowledge, Throwable throwable) -> {
-                            if (!pendingSlotAllocations.contains(slotId)) {
+                            final AllocationID pendingSlotAllocation =
+                                    pendingSlotAllocations.get(slotId);
+                            if (pendingSlotAllocation == null
+                                    || 
!pendingSlotAllocation.equals(allocationId)) {

Review comment:
       Nit: Add a small comment on why the equal check is necessary.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to