rkhachatryan commented on a change in pull request #10345: [FLINK-12484][runtime] synchronize all mailbox actions URL: https://github.com/apache/flink/pull/10345#discussion_r352589261
########## File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/mailbox/MailboxExecutorImpl.java ########## @@ -81,4 +86,13 @@ public boolean tryYield() { return false; } } + + private Mail compose(@Nonnull Runnable command, int priority, String descriptionFormat, Object[] descriptionArgs) { + return new Mail(command, priority, descriptionFormat, descriptionArgs) { Review comment: > Also, as it is now, Mail class is not used anywhere in the production code, which makes it a bit strange. If we want to always use actionExecutor, then it should be added to the Mail. Added it to `Mail`, thanks. > I would try to avoid wrapping Mail into a no-op actionExecutor if it's possible Why? Until we move the `getCheckpointLock()` method to `SourceStreamTask` it's always **not** no-op. After that, we can consider passing null/none (though I doubt if it's needed; I did a quick benchmark and didn't see any significant overhead). > Maybe shortcutting this wrapping if actionExecutor == IMMEDIATE? This could easily break. ---------------------------------------------------------------- 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