lindong28 commented on code in PR #22670: URL: https://github.com/apache/flink/pull/22670#discussion_r1241122518
########## flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java: ########## @@ -929,6 +929,10 @@ private void restoreAndInvoke(TaskInvokable finalInvokable) throws Exception { new TaskExecutionState(executionId, ExecutionState.RUNNING)); runWithSystemExitMonitoring(finalInvokable::invoke); + + taskManagerActions.notifyTaskFinishing(executionId); Review Comment: Would it be simpler to pass `taskManagerActions` to the constructor of `StreamTask` via `RuntimeEnvironment` and let `StreamTask` invoke `notifyTaskFinishing` directly after receiving `END_OF_DATA`? ########## flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java: ########## @@ -2481,6 +2486,14 @@ public void updateTaskExecutionState(final TaskExecutionState taskExecutionState TaskExecutor.this.updateTaskExecutionState(jobMasterGateway, taskExecutionState); } } + + @Override + public void notifyTaskFinishing(final ExecutionAttemptID executionAttemptID) { + runAsync( Review Comment: Would it be simpler to do `runAsync(() -> jobMasterGateway.notifyTaskFinishing(executionAttemptID))` without adding the method `TaskExecutor#notifyTaskFinishing`? -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org