Browse Source

[bugfix] issue #3324

pull/3/MERGE
Zhou Zheng 4 years ago
parent
commit
fa0bb5e546
  1. 19
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java

19
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java

@ -670,6 +670,11 @@ public class MasterExecThread implements Runnable {
} }
TaskNode taskNode = dag.getNode(taskName); TaskNode taskNode = dag.getNode(taskName);
// condition node directly return success
if (taskNode.isConditionsTask()) {
return DependResult.SUCCESS;
}
List<String> depNameList = taskNode.getDepList(); List<String> depNameList = taskNode.getDepList();
for(String depsNode : depNameList ){ for(String depsNode : depNameList ){
if(!dag.containsNode(depsNode) if(!dag.containsNode(depsNode)
@ -682,10 +687,16 @@ public class MasterExecThread implements Runnable {
return DependResult.WAITING; return DependResult.WAITING;
} }
ExecutionStatus depTaskState = completeTaskList.get(depsNode).getState(); ExecutionStatus depTaskState = completeTaskList.get(depsNode).getState();
// conditions task would not return failed. // conditions task should be handled separately
if(depTaskState.typeIsFailure() if (dag.getNode(depsNode).isConditionsTask()) {
&& !DagHelper.haveConditionsAfterNode(depsNode, dag ) List<String> tmpTaskList = parseConditionTask(depsNode);
&& !dag.getNode(depsNode).isConditionsTask()){ if (tmpTaskList.contains(taskName)){
return DependResult.SUCCESS;
}
return DependResult.FAILED;
}
if(depTaskState.typeIsFailure()){
return DependResult.FAILED; return DependResult.FAILED;
} }

Loading…
Cancel
Save