From 74afdcf8f315eb84ba1a87386e4ebab7767c6b35 Mon Sep 17 00:00:00 2001 From: xiangzihao <460888207@qq.com> Date: Tue, 1 Mar 2022 15:20:02 +0800 Subject: [PATCH] [Fix-8506][Master] process instance stop result wrong (#8529) * fix bug_8506 * recover success state --- .../server/master/runner/WorkflowExecuteThread.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java index 59deb39e43..bc0dd09815 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java @@ -415,6 +415,9 @@ public class WorkflowExecuteThread { iTaskProcessor.action(TaskAction.RUN); if (iTaskProcessor.taskInstance().getState().typeIsFinished()) { + if (iTaskProcessor.taskInstance().getState() != task.getState()) { + task.setState(iTaskProcessor.taskInstance().getState()); + } taskFinished(task); } return true; @@ -455,7 +458,10 @@ public class WorkflowExecuteThread { killAllTasks(); } } + } else if (taskInstance.getState().typeIsFinished()) { + completeTaskMap.put(taskInstance.getTaskCode(), taskInstance.getId()); } + this.updateProcessInstanceState(); }