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/07/01 03:02:18 UTC

[GitHub] [dolphinscheduler] JinyLeeChina commented on a diff in pull request #10722: [Bug] [Fix-10673] Workflow recovery bug with failed tasks

JinyLeeChina commented on code in PR #10722:
URL: https://github.com/apache/dolphinscheduler/pull/10722#discussion_r911578706


##########
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java:
##########
@@ -1125,6 +1125,22 @@ private boolean hasFailedTask() {
             if (errorTaskList.size() > 0) {
                 return true;
             }
+        } else {
+            if (processInstance.getCommandType() == CommandType.RECOVER_TOLERANCE_FAULT_PROCESS
+                || processInstance.getCommandType() == CommandType.RECOVER_SUSPENDED_PROCESS) {
+                List<Integer> failedList = processService.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.FAILURE);
+                if (!failedList.isEmpty()) {
+                    return true;
+                }
+                List<Integer> toleranceList = processService.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.NEED_FAULT_TOLERANCE);
+                if (!toleranceList.isEmpty()) {
+                    return true;
+                }
+                List<Integer> killedList = processService.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.KILL);

Review Comment:
   Please see ProcessService|constructProcessInstance() | line 798



-- 
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