From b5653ea7f2d4d14ba92c45e429c2191099450b0f Mon Sep 17 00:00:00 2001 From: WangJPLeo <103574007+WangJPLeo@users.noreply.github.com> Date: Sat, 9 Jul 2022 16:41:51 +0800 Subject: [PATCH] Complement numbers will run in a loop under the serial strategy fixed. (#10862) * Complement numbers will run in a loop under the serial strategy fixed. * e2e rerun --- .../server/master/runner/WorkflowExecuteRunnable.java | 4 +++- .../dolphinscheduler/server/master/BlockingTaskTest.java | 1 - 2 files changed, 3 insertions(+), 2 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 32d1724b15..1834e413f8 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 @@ -592,7 +592,9 @@ public class WorkflowExecuteRunnable implements Callable { return false; } - if (processInstance.getState() == ExecutionStatus.READY_STOP) { + // when the serial complement is executed, the next complement instance is created, + // and this method does not need to be executed when the parallel complement is used. + if (processInstance.getState() == ExecutionStatus.READY_STOP || !processInstance.getState().typeIsFinished()) { return false; } diff --git a/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/BlockingTaskTest.java b/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/BlockingTaskTest.java index 602afd987f..64bc291152 100644 --- a/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/BlockingTaskTest.java +++ b/dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/BlockingTaskTest.java @@ -266,5 +266,4 @@ public class BlockingTaskTest { ExecutionStatus status = processInstance.getState(); Assert.assertEquals(ExecutionStatus.RUNNING_EXECUTION, status); } - }