From 7b0e6fe5ecb56c5231bf0fe60d5253593df69b9d Mon Sep 17 00:00:00 2001 From: WangJPLeo <103574007+WangJPLeo@users.noreply.github.com> Date: Thu, 12 May 2022 16:31:53 +0800 Subject: [PATCH] =?UTF-8?q?[Fix-9975]=20The=20selected=20task=20instance?= =?UTF-8?q?=20was=20recreated=20when=20the=20Master=20service=20fail?= =?UTF-8?q?=E2=80=A6=20(#9976)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * The selected task instance was recreated when the Master service failed over. * Returns the expression result directly. * Use Recovery to determine whether to use the old task instance. (cherry picked from commit dbdbfeaeee4b6aaaa738ef642a908f700f0cb9bc) --- .../server/master/runner/WorkflowExecuteThread.java | 3 +++ 1 file changed, 3 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 98556dc0f0..3b7b5511ae 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 @@ -1960,6 +1960,9 @@ public class WorkflowExecuteThread { private boolean isNewProcessInstance() { if (ExecutionStatus.RUNNING_EXECUTION == processInstance.getState() && processInstance.getRunTimes() == 1) { return true; + } else if (processInstance.getRecovery().equals(Flag.YES)) { + // host is empty use old task instance + return false; } else { return false; }