Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4937#discussion_r148596041
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/instance/SlotPool.java ---
    @@ -262,23 +263,36 @@ public void disconnectResourceManager() {
        // 
------------------------------------------------------------------------
     
        @Override
    -   public CompletableFuture<SimpleSlot> allocateSlot(
    -                   ScheduledUnit task,
    +   public CompletableFuture<SimpleSlot> allocateSlot(AllocationID 
allocationID,
                        ResourceProfile resources,
                        Iterable<TaskManagerLocation> locationPreferences,
                        Time timeout) {
     
    -           return internalAllocateSlot(task, resources, 
locationPreferences);
    +           return internalAllocateSlot(allocationID, resources, 
locationPreferences);
        }
     
        @Override
        public void returnAllocatedSlot(Slot slot) {
                internalReturnAllocatedSlot(slot);
        }
     
    +   @Override
    +   public void cancelSlotAllocation(AllocationID allocationID) {
    +           waitingForResourceManager.remove(allocationID);
    --- End diff --
    
    we should fail the pending request properly. E.g. check if the slot is in 
`waitingForResourceManager` or `pendingRequests`. If yes, then remove and call 
`failPendingRequest`.


---

Reply via email to