You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/10/20 02:45:54 UTC

[GitHub] [dolphinscheduler] WangJPLeo commented on a diff in pull request #12448: [Bug] Improve the scenario of continuing to submit subsequent tasks after failure

WangJPLeo commented on code in PR #12448:
URL: https://github.com/apache/dolphinscheduler/pull/12448#discussion_r1000091288


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java:
##########
@@ -419,6 +416,25 @@ public void taskFinished(TaskInstance taskInstance) throws StateEventHandleExcep
         }
     }
 
+    /**
+     * continue to submit subsequent tasks after failure
+     *
+     * if there are subsequent tasks:
+     *      1. nodes are parallel;
+     *      2. nodes are serial and failed task type is condition;
+     *      3. nodes are serial and next task type is condition;
+     */
+    private void failureContinueSubmitPostNodes(TaskInstance taskInstance) throws StateEventHandleException {
+        if (!DagHelper.haveAnyNodeAfterNode(Long.toString(taskInstance.getTaskCode()), dag)) {
+            submitPostNode(Long.toString(taskInstance.getTaskCode()));
+        } else {
+            if (taskInstance.isConditionsTask()
+                    || DagHelper.haveConditionsAfterNode(Long.toString(taskInstance.getTaskCode()), dag)) {
+                submitPostNode(Long.toString(taskInstance.getTaskCode()));
+            }
+        }

Review Comment:
   That's excellent, i will improve it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org