pnowojski commented on a change in pull request #10779: [FLINK-15327][runtime]
No warning of InterruptedException during cancel.
URL: https://github.com/apache/flink/pull/10779#discussion_r363332658
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -484,27 +484,15 @@ public final void invoke() throws Exception {
private void runMailboxLoop() throws Exception {
try {
- try {
- mailboxProcessor.runMailboxLoop();
- }
- catch (WrappingRuntimeException wrappingException) {
- Throwable unwrapped =
wrappingException.unwrap();
- if (unwrapped instanceof Exception) {
- throw (Exception) unwrapped;
- }
- else {
- throw wrappingException;
- }
- }
- }
- catch (InterruptedException e) {
- if (!canceled) {
- Thread.currentThread().interrupt();
- throw e;
- }
+ mailboxProcessor.runMailboxLoop();
}
catch (Exception e) {
- if (canceled) {
+ if (ExceptionUtils.findThrowable(e,
InterruptedException.class).isPresent()) {
Review comment:
We could add a simple test coverage for this, for example by extending
`SourceStreamTaskTest#testInterruptedNotSwallowed` with a boolean parameter,
controlling whether the exception is thrown wrapped or not (similar pattern as
`SourceStreamTaskTest#testCancellationWithSourceBlockedOnLock(boolean,
boolean)`.
----------------------------------------------------------------
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