rkhachatryan commented on a change in pull request #10151: [FLINK-14231] Handle 
the processing-time timers before closing operator to properly support endInput
URL: https://github.com/apache/flink/pull/10151#discussion_r346737289
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
 ##########
 @@ -278,7 +282,11 @@ protected void cleanup() throws Exception {
        protected void processInput(MailboxDefaultAction.Controller controller) 
throws Exception {
                InputStatus status = inputProcessor.processInput();
                if (status == InputStatus.END_OF_INPUT) {
-                       controller.allActionsCompleted();
+                       new ClosingOperatorOperation()
+                               .closeAllOperatorsAsync()
+                               .thenRun(controller::allActionsCompleted);
 
 Review comment:
   Can we guard somehow against executing this code twice (at least check 
isRunning or maybe have a lifecycle enum)?

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