azagrebin commented on a change in pull request #10682: [FLINK-15247][Runtime] 
Wait for all slots to be free before task executor services shutdown upon 
stopping
URL: https://github.com/apache/flink/pull/10682#discussion_r368607984
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java
 ##########
 @@ -356,7 +373,7 @@ public boolean markSlotActive(AllocationID allocationId) 
throws SlotNotFoundExce
         * @return True if the slot could be marked inactive
         */
        public boolean markSlotInactive(AllocationID allocationId, Time 
slotTimeout) throws SlotNotFoundException {
-               checkInit();
+               checkStartedOrClosing();
 
 Review comment:
   As discussed offline, enabling this check would need at least disabling 
message handling after `RpcEndpoint#onStop` to not accept disconnect messages 
from job master after `taskExecutor#onStop`. On the other hand, requiring only 
start method call (not `CREATED`) should be enough because calling it in 
non-running state will register a timeout in worse case or observe no slot. The 
issue with concurrent access in `timerService#stop` should be resolved anyways.

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


With regards,
Apache Git Services

Reply via email to