From c7cb18242bfba0f2f45f2742d6dd4a5bacafdb1b Mon Sep 17 00:00:00 2001 From: Kirs Date: Mon, 14 Dec 2020 10:36:15 +0800 Subject: [PATCH] cherry pick #4219 to 1.3.4-pre (#4220) --- .../org/apache/dolphinscheduler/dao/utils/DagHelper.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java index 563f64f455..aa64e53356 100644 --- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java +++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/utils/DagHelper.java @@ -374,11 +374,14 @@ public class DagHelper { DAG dag, Map completeTaskList, Map skipTaskNodeList){ + if (!dag.containsNode(skipNodeName)) { + return; + } skipTaskNodeList.putIfAbsent(skipNodeName, dag.getNode(skipNodeName)); Collection postNodeList = dag.getSubsequentNodes(skipNodeName); - for(String post : postNodeList){ + for (String post : postNodeList) { TaskNode postNode = dag.getNode(post); - if(isTaskNodeNeedSkip(postNode, skipTaskNodeList)){ + if (isTaskNodeNeedSkip(postNode, skipTaskNodeList)) { setTaskNodeSkip(post, dag, completeTaskList, skipTaskNodeList); } }