hawk9821 commented on code in PR #10133:
URL: https://github.com/apache/seatunnel/pull/10133#discussion_r2740338384


##########
seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/dag/physical/PhysicalPlan.java:
##########
@@ -274,6 +278,11 @@ public synchronized void updateJobState(@NonNull JobStatus 
targetState) {
             log.info(
                     String.format(
                             "%s turned from state %s to %s.", jobFullName, 
current, targetState));
+            if (!targetState.isEndState()

Review Comment:
   All state changes must execute this check logic, wouldn't it be better to 
migrate the logic to the stateProcess method ?
   ```
   case PENDING:
   case SCHEDULED:
     getPipelineList()
             .forEach(
                     subPlan -> {
                         if (PipelineStatus.CREATED.equals(
                                 subPlan.getCurrPipelineStatus())) {
                             subPlan.startSubPlanStateProcess();
                         }
                     });
     updateJobState(JobStatus.RUNNING);
     if (this.engineConfig != null && 
this.engineConfig.isReportNonTerminalJobState()) {
          reportJobStateEvent(targetState);
     } 
     break;
   case ...
   ```



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