This is an automated email from the ASF dual-hosted git repository.

kirs 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 b71967b  fix bug-6279 Parallel tasks would be Irregularly submitted 
twice (#6280)
b71967b is described below

commit b71967b017f0d4c50f5837a3173ba0f35bf2c077
Author: OS <[email protected]>
AuthorDate: Tue Sep 21 12:04:31 2021 +0800

    fix bug-6279 Parallel tasks would be Irregularly submitted twice (#6280)
---
 .../server/master/runner/WorkflowExecuteThread.java    | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
index b0e149a..a977f0b 100644
--- 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
+++ 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
@@ -193,6 +193,12 @@ public class WorkflowExecuteThread implements Runnable {
     private ConcurrentHashMap<Integer, TaskInstance> taskTimeoutCheckList;
 
     /**
+     * start flag, true: start nodes submit completely
+     *
+     */
+    private boolean isStart = false;
+
+    /**
      * constructor of WorkflowExecuteThread
      *
      * @param processInstance processInstance
@@ -228,6 +234,14 @@ public class WorkflowExecuteThread implements Runnable {
         }
     }
 
+    /**
+     * the process start nodes are submitted completely.
+     * @return
+     */
+    public boolean isStart() {
+        return this.isStart;
+    }
+
     private void handleEvents() {
         while (this.stateEvents.size() > 0) {
 
@@ -460,10 +474,12 @@ public class WorkflowExecuteThread implements Runnable {
     }
 
     private void startProcess() throws Exception {
-        buildFlowDag();
         if (this.taskInstanceHashMap.size() == 0) {
+            isStart = false;
+            buildFlowDag();
             initTaskQueue();
             submitPostNode(null);
+            isStart = true;
         }
     }
 

Reply via email to