wu-a-ge commented on code in PR #5114:
URL: https://github.com/apache/seatunnel/pull/5114#discussion_r1268826767


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java:
##########
@@ -495,10 +495,11 @@ public PassiveCompletableFuture<Void> savePoint(long 
jobId) {
     public PassiveCompletableFuture<JobResult> waitForJobComplete(long jobId) {
         JobMaster runningJobMaster = runningJobMasterMap.get(jobId);
         if (runningJobMaster == null) {
-            JobStatus jobStatus = 
jobHistoryService.getJobDetailState(jobId).getJobStatus();
+            JobHistoryService.JobState jobState = 
jobHistoryService.getJobDetailState(jobId);
             CompletableFuture<JobResult> future = new CompletableFuture<>();
-            // TODO support history service record job execute error
-            future.complete(new JobResult(jobStatus, null));
+            if (jobState == null) future.complete(new 
JobResult(JobStatus.FAILED, null));

Review Comment:
   Here I think we should add a new state to notify the user that the Job is 
lost, instead of returning FAILED, but the impact of adding the state 
modification scope is large, so I think we can optimize it later!



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