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

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java
 ##########
 @@ -123,14 +124,12 @@ protected void performDefaultAction(ActionContext 
context) throws Exception {
                context.allActionsCompleted();
        }
 
-       private void runAlternativeMailboxLoop() throws InterruptedException {
+       private void runAlternativeMailboxLoop() throws InterruptedException, 
MailboxStateException {
 
-               while (true) {
+               final Mailbox mailbox = taskMailboxExecutor.getMailbox();
 
 Review comment:
   Because you are using the mailbox here directly, you can also add a 
precondition similar to `taskMailboxExecutor.checkIsMailboxThread()`.
   
   Otherwise, it's implicitly not compatible with some tests now. I've worked 
on a fix in the checkpoints-to-mailbox ticket, 
   if you want, I can try to cherry pick them before your commit, to properly 
check that tests are good with your PR.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to