ricky2129 commented on code in PR #10567:
URL: https://github.com/apache/seatunnel/pull/10567#discussion_r2917763125


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/dag/physical/PhysicalVertex.java:
##########
@@ -206,6 +206,18 @@ public PassiveCompletableFuture<TaskExecutionState> 
initStateFuture() {
 
     public void restoreExecutionState() {
         startPhysicalVertex();
+        // Re-sync currExecutionState from IMap before processing. During 
master failover,
+        // IMap may still say DEPLOYING if the master crashed after the worker 
finished
+        // deploying but before the master processed NotifyTaskStatusOperation 
and updated
+        // the IMap to RUNNING. In that case, check whether the task is 
actually executing
+        // on the worker and advance the state to RUNNING so stateProcess() 
does not send
+        // a redundant DeployTaskOperation.
+        this.currExecutionState = (ExecutionState) 
runningJobStateIMap.get(taskGroupLocation);
+        if (ExecutionState.DEPLOYING.equals(currExecutionState)) {
+            if (checkTaskGroupIsExecuting(taskGroupLocation)) {
+                updateTaskState(ExecutionState.RUNNING);
+            }
+        }

Review Comment:
   @dybyte added the changes, please review



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to