dybyte commented on code in PR #10692:
URL: https://github.com/apache/seatunnel/pull/10692#discussion_r3029181899


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java:
##########
@@ -721,6 +721,16 @@ private void restoreJobFromMasterActiveSwitch(@NonNull 
Long jobId, @NonNull JobI
             return;
         }
 
+        if (jobState instanceof JobStatus && ((JobStatus) 
jobState).isEndState()) {
+            logger.warning(
+                    String.format(
+                            "Job %s is in terminal state %s in 
runningJobInfoIMap, "
+                                    + "removing zombie entry to prevent 
incorrect restore",
+                            jobId, jobState));
+            runningJobInfoIMap.remove(jobId);
+            return;
+        }

Review Comment:
   +1, this approach looks good to me.



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