Browse Source

[Fix-13657][Master]NPE caused by the execution of workflow with startNode and forbidden task (#13668)

Co-authored-by: HomminLee <lihongmin@ysstech.com>
3.1.5-release
HomminLee 2 years ago committed by zhuangchong
parent
commit
c5a5ff7a74
  1. 7
      dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java

7
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java

@ -1419,8 +1419,11 @@ public class WorkflowExecuteRunnable implements Callable<WorkflowSubmitStatue> {
*/
private void setIndirectDepList(String taskCode, List<String> indirectDepCodeList) {
TaskNode taskNode = dag.getNode(taskCode);
List<String> depCodeList = taskNode.getDepList();
for (String depsNode : depCodeList) {
// If workflow start with startNode or recoveryNode, taskNode may be null
if (taskNode == null) {
return;
}
for (String depsNode : taskNode.getDepList()) {
if (forbiddenTaskMap.containsKey(Long.parseLong(depsNode))) {
setIndirectDepList(depsNode, indirectDepCodeList);
} else {

Loading…
Cancel
Save