rkhachatryan commented on a change in pull request #10336: 
[FLINK-14935][task,runtime] Use RunnableWithException in the Mailbox
URL: https://github.com/apache/flink/pull/10336#discussion_r351332014
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/mailbox/MailboxExecutorImpl.java
 ##########
 @@ -68,14 +70,23 @@ public void executeFirst(
 
        @Override
        public void yield() throws InterruptedException {
-               mailbox.take(priority).run();
+               Mail mail = mailbox.take(priority);
+               try {
+                       mail.run();
+               } catch (Exception ex) {
+                       throw WrappingRuntimeException.wrapIfNecessary(ex);
+               }
        }
 
 Review comment:
   We execute user-supplied code here and call it e.g. from 
StreamTask.triggerCheckpointOnBarrier, so probably it's better not to hide the 
exception but to declare it or at least document with @ throws.
   
   

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


With regards,
Apache Git Services

Reply via email to