rkhachatryan commented on a change in pull request #16885:
URL: https://github.com/apache/flink/pull/16885#discussion_r692342230



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -793,8 +785,6 @@ private void runWithCleanUpOnFail(RunnableWithException 
run) throws Exception {
                         invokeException = firstOrSuppressed(ex, 
invokeException);
                     }
                 }
-
-                cleanUpInvoke();
             }
             // TODO: investigate why Throwable instead of Exception is used 
here.
             catch (Throwable cleanUpException) {

Review comment:
       Thanks for pointing out! I apparently missed it.
   I'll remove the `try` block and rename `runWithCleanUpOnFail` to 
`runAndCancelOnFailure` .
   Implemented this in 39f9e482298d2472be2fa3c1ac7b178ca8b96784
   
   edit:
   I realized that `cancelTask` can also be moved to `cleanUp` - so the 
`runWith...` method can be completely removed.
   This will also allow to simplify `SourceStreamTaskTest` by only overriding 
`cancelTask` and keeping `cleanUp` final.
   Implemented this in d5addcf68b53ef8fed16b22195b1a8be63d6e48c.




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


Reply via email to