rkhachatryan commented on a change in pull request #16885:
URL: https://github.com/apache/flink/pull/16885#discussion_r694688633
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -875,7 +875,8 @@ public final void cleanUp(Throwable throwable) throws
Exception {
failing = !canceled && (!(throwable instanceof CancelTaskException));
- Exception suppressedException =
runAndSuppressThrowable(this::cancelTask, null);
+ Exception suppressedException =
+ throwable == null ? null :
runAndSuppressThrowable(this::cancelTask, null);
Review comment:
I decided not to suppress throwable in `cleanUp` because:
1. There can be other implementations that do throw an exception from
`cleanUp`
2. `runAndSuppressThrowable` returns an `Exception`, not `Throwable`; so it
would either wrap it as it does now, or `cleanUp` should declare that it throws
`Throwable`; both of these are undesirable IMO
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]