From 8e64026e93ed5451ade1d16549290028cc3fb0d9 Mon Sep 17 00:00:00 2001 From: JieguangZhou Date: Fri, 11 Aug 2023 14:35:31 +0800 Subject: [PATCH] fix fault tolerant enviroment missing (#14735) --- .../server/master/runner/WorkflowExecuteRunnable.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java index 4d32ebbff3..e8e2a6a233 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java @@ -1292,10 +1292,13 @@ public class WorkflowExecuteRunnable implements IWorkflowExecuteRunnable { Optional existTaskInstanceOptional = getTaskInstance(taskNodeObject.getCode()); if (existTaskInstanceOptional.isPresent()) { TaskInstance existTaskInstance = existTaskInstanceOptional.get(); - if (existTaskInstance.getState() == TaskExecutionStatus.RUNNING_EXECUTION - || existTaskInstance.getState() == TaskExecutionStatus.DISPATCH) { + TaskExecutionStatus state = existTaskInstance.getState(); + if (state == TaskExecutionStatus.RUNNING_EXECUTION + || state == TaskExecutionStatus.DISPATCH + || state == TaskExecutionStatus.SUBMITTED_SUCCESS) { // try to take over task instance - if (tryToTakeOverTaskInstance(existTaskInstance)) { + if (state != TaskExecutionStatus.SUBMITTED_SUCCESS + && tryToTakeOverTaskInstance(existTaskInstance)) { log.info("Success take over task {}", existTaskInstance.getName()); continue; } else {