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_r368609623
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/slot/TaskSlotTable.java
 ##########
 @@ -605,7 +615,7 @@ public boolean addTask(Task task) throws 
SlotNotFoundException, SlotNotActiveExc
         * @return The removed task if there is any for the given execution 
attempt id; otherwise null
         */
        public Task removeTask(ExecutionAttemptID executionAttemptID) {
-               checkInit();
+               checkStartedOrClosing();
 
 Review comment:
   All `TaskExecutor#updateTaskExecutionState` callbacks with `removeTask` 
should be scheduled to the main thread in task executor before task termination 
future is competed. This means that the final `CLOSED` table state will not be 
set before that. If so, I would keep the check.

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