StefanRRichter commented on a change in pull request #8692: [FLINK-12804] 
Introduce mailbox-based ExecutorService
URL: https://github.com/apache/flink/pull/8692#discussion_r292527478
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
 ##########
 @@ -395,6 +417,9 @@ public final void invoke() throws Exception {
                                // make sure no new timers can come
                                timerService.quiesce();
 
+                               // let mailbox execution reject all new letters 
from this point
+                               taskMailboxExecutor.shutdown();
 
 Review comment:
   Currently I don't see any concrete case that would need this. Timers, 
checkpoints, operators, etc should all be completed at this point. If an 
operator needs to ensure that something completes first, it can do so in its 
`close` method - like the Async operator will do for example. And the way 
operators can do this is by calling `yield()` until they are satisfied and 
their actions have been processed. With this solution for close and as long as 
there is no real need I would strictly avoid running anything here so that the 
shutdown can complete asap. If the need ever comes up against the expectations 
it is also not hard to add.

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