You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/02/05 13:50:16 UTC

[GitHub] [flink] rkhachatryan commented on a change in pull request #11026: [FLINK-15811][task] report CancelTaskException from SourceStreamTask

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:
users@infra.apache.org


With regards,
Apache Git Services