beliefer commented on code in PR #26469:
URL: https://github.com/apache/flink/pull/26469#discussion_r2046561417


##########
flink-runtime/src/main/java/org/apache/flink/streaming/runtime/tasks/mailbox/TaskMailbox.java:
##########
@@ -97,26 +97,32 @@ public interface TaskMailbox {
     boolean hasMail();
 
     /**
-     * Returns an optional with either the oldest mail from the mailbox (head 
of queue) if the
-     * mailbox is not empty or an empty optional otherwise.
+     * Returns an optional with either the oldest mail from the mailbox if the 
mailbox is not empty
+     * or an empty optional otherwise. Note that the priority is given to 
retrieving email from the
+     * head of batch, and when email cannot be retrieved from the batch, it is 
retrieved from the
+     * head of queue. This also means that emails in batch are older than 
emails in queue.

Review Comment:
   Adds comments to increasing the readability of `tryTake` and `take`. These 
comments show below.
    `Note that the priority is given to retrieving email from the head of 
batch, and when email cannot be retrieved from the batch, it is retrieved from 
the head of queue. This also means that emails in batch are older than emails 
in queue.`



-- 
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

Reply via email to