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


##########
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.
      *
      * <p>Must be called from the mailbox thread ({@link #isMailboxThread()}.
      *
      * @return an optional with either the oldest mail from the mailbox (head 
of queue) if the
      *     mailbox is not empty or an empty optional otherwise.
-     * @throws IllegalStateException if mailbox is already closed.
+     * @throws MailboxClosedException if mailbox is already closed.

Review Comment:
   Supplement the missing exception into comments.



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