Browse Source

fix bug-6279 Parallel tasks would be Irregularly submitted twice (#6280)

2.0.7-release
OS 3 years ago committed by GitHub
parent
commit
b71967b017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java

18
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java

@ -192,6 +192,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
*
@ -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;
}
}

Loading…
Cancel
Save