Browse Source

Set the workflow instance ready state to running in failover (#15572)

3.2.2-prepare
Wenjun Ruan 11 months ago committed by GitHub
parent
commit
1b32e28cc8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java

8
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java

@ -793,6 +793,14 @@ public class ProcessServiceImpl implements ProcessService {
break; break;
case RECOVER_TOLERANCE_FAULT_PROCESS: case RECOVER_TOLERANCE_FAULT_PROCESS:
// recover tolerance fault process // recover tolerance fault process
// If the workflow instance is in ready state, we will change to running, this can avoid the workflow
// instance
// status is not correct with taskInsatnce status
if (processInstance.getState() == WorkflowExecutionStatus.READY_PAUSE
|| processInstance.getState() == WorkflowExecutionStatus.READY_STOP) {
// todo: If we handle the ready state in WorkflowExecuteRunnable then we can remove below code
processInstance.setState(WorkflowExecutionStatus.RUNNING_EXECUTION);
}
processInstance.setRecovery(Flag.YES); processInstance.setRecovery(Flag.YES);
processInstance.setRunTimes(runTime + 1); processInstance.setRunTimes(runTime + 1);
runStatus = processInstance.getState(); runStatus = processInstance.getState();

Loading…
Cancel
Save