Browse Source

Fix task instance which status is dispatch will not be failover (#16107)

upstream-dev
Wenjun Ruan 6 months ago committed by GitHub
parent
commit
5867bee95d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java

8
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java

@ -1219,12 +1219,12 @@ public class WorkflowExecuteRunnable implements IWorkflowExecuteRunnable {
|| state == TaskExecutionStatus.DISPATCH || state == TaskExecutionStatus.DISPATCH
|| state == TaskExecutionStatus.SUBMITTED_SUCCESS || state == TaskExecutionStatus.SUBMITTED_SUCCESS
|| state == TaskExecutionStatus.DELAY_EXECUTION) { || state == TaskExecutionStatus.DELAY_EXECUTION) {
// try to take over task instance if (state == TaskExecutionStatus.SUBMITTED_SUCCESS
if (state == TaskExecutionStatus.SUBMITTED_SUCCESS || state == TaskExecutionStatus.DELAY_EXECUTION || state == TaskExecutionStatus.DELAY_EXECUTION) {
|| state == TaskExecutionStatus.DISPATCH) {
// The taskInstance is not in running, directly takeover it // The taskInstance is not in running, directly takeover it
} else if (tryToTakeOverTaskInstance(existTaskInstance)) { } else if (tryToTakeOverTaskInstance(existTaskInstance)) {
log.info("Success take over task {}", existTaskInstance.getName()); // If the taskInstance has already dispatched to worker then will try to take-over it
log.info("Success take over task {} -> status: {}", existTaskInstance.getName(), state);
continue; continue;
} else { } else {
// set the task instance state to fault tolerance // set the task instance state to fault tolerance

Loading…
Cancel
Save