azagrebin commented on a change in pull request #7757: [FLINK-11630] Triggers the termination of all running Tasks when shutting down TaskExecutor URL: https://github.com/apache/flink/pull/7757#discussion_r282882465
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java ########## @@ -1000,28 +1008,28 @@ public void cancelExecution() { * <p>This method never blocks.</p> */ @Override - public void failExternally(Throwable cause) { + public CompletableFuture<Void> failExternally(Throwable cause) { Review comment: If we add `public Task#getCompletionFuture()` method, we can avoid all changes in `failExternally/cancelOrFailAndCancelInvokable`. `failExternally/cancelOrFailAndCancelInvokable` can still be used to trigger the cancelation but we are interested in the task.run completion at the end which is a subsequent result of the cancelation. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services