aljoscha commented on a change in pull request #9090: [FLINK-13124] Don't 
forward exceptions when finishing SourceStreamTask
URL: https://github.com/apache/flink/pull/9090#discussion_r304170411
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java
 ##########
 @@ -127,6 +127,10 @@ protected void cancelTask() {
 
        @Override
        protected void finishTask() throws Exception {
+               // We tell the mailbox to finish, to prevent any exceptions 
that might occur during
+               // finishing from leading to a FAILED state. This could happen, 
for example, when cancelling
+               // sources as part of a "stop-with-savepoint".
+               mailboxProcessor.allActionsCompleted();
 
 Review comment:
   On the `release-1.9` branch `StreamTask.cancel()` also doesn't use this 
method, in fact the `MailboxProcessor` doesn't yet exist and isn't used like 
this. However, this solution leads to a race condition, see also 
https://github.com/apache/flink/pull/9125.

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