This is an automated email from the ASF dual-hosted git repository.
zhongjiajie pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 8e64026e93 fix fault tolerant enviroment missing (#14735)
8e64026e93 is described below
commit 8e64026e93ed5451ade1d16549290028cc3fb0d9
Author: JieguangZhou <[email protected]>
AuthorDate: Fri Aug 11 14:35:31 2023 +0800
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<TaskInstance> 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 {