rkhachatryan commented on a change in pull request #11026: [FLINK-15811][task] 
report CancelTaskException from SourceStreamTask
URL: https://github.com/apache/flink/pull/11026#discussion_r375264755
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java
 ##########
 @@ -121,10 +123,12 @@ protected void 
processInput(MailboxDefaultAction.Controller controller) throws E
                sourceThread.setTaskDescription(getName());
                sourceThread.start();
                sourceThread.getCompletionFuture().whenComplete((Void ignore, 
Throwable sourceThreadThrowable) -> {
-                       if (sourceThreadThrowable == null || isFinished) {
-                               mailboxProcessor.allActionsCompleted();
-                       } else {
+                       if (isCanceled() && 
ExceptionUtils.findThrowable(sourceThreadThrowable, 
InterruptedException.class).isPresent()) {
+                               mailboxProcessor.reportThrowable(new 
CancelTaskException(sourceThreadThrowable));
 
 Review comment:
   Interruption is internal to `SourceStreamTask`, so I think the flag 
shouldn't be set.

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