pnowojski commented on code in PR #24904: URL: https://github.com/apache/flink/pull/24904#discussion_r1629586122
########## flink-core/src/main/java/org/apache/flink/api/common/operators/MailboxExecutor.java: ########## @@ -86,6 +87,25 @@ public interface MailboxExecutor { /** A constant for empty args to save on object allocation. */ Object[] EMPTY_ARGS = new Object[0]; + /** Extra options to configure enqueued mails. */ + @Experimental + interface MailOptions { + static MailOptions options() { + return new MailOptionsImpl(); + } + + /** + * Mark this mail as interruptible. + * + * <p>Interruptible mails, are those that respect {@link MailboxExecutor#shouldInterrupt()} + * flag. Marking mail as interruptible allows {@link MailboxExecutor} to optimize execution + * order. For example interruptible mails are not executed during {@link #yield()} or {@link + * #tryYield()}, to avoid having to immediately interrupt them. This is done to speed up + * checkpointing, by skipping execution of potentially long running mails. + */ + MailOptions setInterruptible(); Review Comment: Yes, correct. The intention behind this was to expose somehow to the mailbox executor/processor that mail is interruptible and so that they can handle it differently. But I see your point. What would you suggest? Renaming this to `MailOptions#setLowPriority()`? `#setDeferrable()`? -- 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. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org