azagrebin commented on issue #9072: [FLINK-11630] Wait for the termination of all running Tasks when shutting down TaskExecutor URL: https://github.com/apache/flink/pull/9072#issuecomment-512726382 Hi @ifndef-SleePy If you mean this concern https://github.com/apache/flink/pull/7757#pullrequestreview-240008731 about forgetting to wait for some tasks, it is because the old PR used `TaskSlotTable` to get uncompleted tasks at some point of time. The problem is that `TaskSlotTable` might not always track tasks synchronised with their completion futures as it addresses other concerns and there are can be race conditions. I also left more explanation about it on the old PR https://github.com/apache/flink/pull/7757#issuecomment-496118950. This is the reason why the old PR was changed and this PR uses a separate tracking which explicitly removes the task only if it is completed. The completion future is always at the very end of Task.run and is called always on Task.run exit to not miss any action in Task.run (in this case release of resources is important).
---------------------------------------------------------------- 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
