GJL commented on a change in pull request #10067: [FLINK-14375][runtime] Avoid 
to notify scheduler about fake or outdated state update
URL: https://github.com/apache/flink/pull/10067#discussion_r342467193
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java
 ##########
 @@ -417,12 +417,50 @@ public void cancel() {
        @Override
        public final boolean updateTaskExecutionState(final TaskExecutionState 
taskExecutionState) {
                final Optional<ExecutionVertexID> executionVertexId = 
getExecutionVertexId(taskExecutionState.getID());
-               if (executionVertexId.isPresent()) {
-                       executionGraph.updateState(taskExecutionState);
-                       
updateTaskExecutionStateInternal(executionVertexId.get(), taskExecutionState);
+
+               boolean updateSuccess = 
executionGraph.updateState(taskExecutionState);
+
+               if (updateSuccess && executionVertexId.isPresent()) {
 
 Review comment:
   `updateSuccess` should be `false` if the `attemptId` is outdated. I think 
`executionVertexId.isPresent()` is not needed. See my other comment. 

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