pnowojski commented on code in PR #24904:
URL: https://github.com/apache/flink/pull/24904#discussion_r1631437091


##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/mailbox/Mail.java:
##########
@@ -71,8 +77,13 @@ public Mail(
         this.actionExecutor = actionExecutor;
     }
 
+    public MailboxExecutor.MailOptions getMailOptions() {
+        return mailOptions;
+    }
+
     public int getPriority() {
-        return priority;
+        /** See {@link MailboxExecutor.MailOptions#setInterruptible()}. */
+        return mailOptions.isInterruptible() ? TaskMailbox.MIN_PRIORITY : 
priority;

Review Comment:
   That should be fine AFAIK. `MIN_PRIORITY` is used for the top level mails, 
that no one should ever `yield` to. `yield()`. Operators, which are the only 
ones who should ever call `.yield()`,  have priorities always `> MIN_PRIORITY`.
   
   I dunno, I think `priority` name here might be a bit misleading. It's more 
like ordering id. Entity with `orderingIdA` that, is not allowed to yield to an 
entity with `orderingIdB`, where `orderingIdA > orderingIdB`. This way of 
yielding, we were calling `yield-to-downstream` - operators were allowed to 
only yield to a downstream entity, to relief back-pressure. 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to