pnowojski commented on a change in pull request #10009: [FLINK-14304] Avoid 
task starvation with mailbox
URL: https://github.com/apache/flink/pull/10009#discussion_r341114825
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/mailbox/Mailbox.java
 ##########
 @@ -37,33 +37,33 @@
         *
         * @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  MailboxStateException if mailbox is already closed.
+        * @throws IllegalStateException if mailbox is already closed.
         */
-       Optional<Mail> tryTake(int priority) throws MailboxStateException;
+       Optional<Mail> tryTake(int priority) throws IllegalStateException;
 
        /**
         * This method returns the oldest mail from the mailbox (head of queue) 
or blocks until a mail is available.
         *
         * @return the oldest mail from the mailbox (head of queue).
         * @throws InterruptedException on interruption.
-        * @throws  MailboxStateException if mailbox is already closed.
+        * @throws IllegalStateException if mailbox is already closed.
         */
        @Nonnull
-       Mail take(int priority) throws InterruptedException, 
MailboxStateException;
+       Mail take(int priority) throws InterruptedException;
 
 Review comment:
   One big difference between `MailboxStateException` and 
`IllegalStateException` is that the latter is a `RuntimeException`, as we can 
see in this missing `throws` declaration.
   
   The question is, whether we think this is indeed an `IllegalState` which 
indicates a bug and code should crash, or whether such exception should/could 
be handled by someone? I guess it's a bug.

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

Reply via email to