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/07/29 17:44:37 UTC

[GitHub] [flink] rkhachatryan commented on a change in pull request #13000: [FLINK-15467][task] Wait for sourceTaskThread to finish before exiting from StreamTask.invoke

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



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -562,6 +567,7 @@ private void runMailboxLoop() throws Exception {
 
 	protected void afterInvoke() throws Exception {
 		LOG.debug("Finished task {}", getName());
+		getCompletionFuture().exceptionally(unused -> null).join();

Review comment:
       So you suggest to
   1. move `.exceptionally(unused -> null)` from `StreamTask` to `SourceStreamTask` (or wrap in some other way)
   2. in `StreamTask`, propagate failure as a programming error
   
   Did I get you right?
   
   If so, I think it introduces an unnecessary contract that `getCompletionFuture` never completes exceptionally and actually makes the code less error-prone (think of other `StreamTask` subclasses).




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