pnowojski 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_r351369829
##########
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:
But the designed use case of `yield` is inside user's operators. There we
don't want to pollute user code with some random exceptions that he can not
handle in any way (and we would force him to either declare `throws Exception`
everywhere in his code, or to wrap it into the runtime anyway).
----------------------------------------------------------------
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