Skip to content

Commit

Permalink
[FLINK-191909][task] Ignore isLoopRunning in MailboxExecutor.isIdle
Browse files Browse the repository at this point in the history
When closing, this flag is set, but mailbox can still contain
(and receive new) mails (e.g. from timers) that should be processed.
In particular, this check currently prevents periodic watermarks from
being emitted.
  • Loading branch information
rkhachatryan committed Sep 2, 2020
1 parent 79e74f5 commit 6da9dbc
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -57,8 +57,7 @@ public MailboxExecutorImpl(@Nonnull TaskMailbox mailbox, int priority, StreamTas
}

public boolean isIdle() {
return !mailboxProcessor.isMailboxLoopRunning() ||
(mailboxProcessor.isDefaultActionUnavailable() && !mailbox.hasMail() && mailbox.getState().isAcceptingMails());
return mailboxProcessor.isDefaultActionUnavailable() && !mailbox.hasMail() && mailbox.getState().isAcceptingMails();
}

@Override
Expand Down

0 comments on commit 6da9dbc

Please sign in to comment.