This is an automated email from the ASF dual-hosted git repository.
jinyleechina pushed a commit to branch 2.0.6-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/2.0.6-prepare by this push:
new ab046dae9d [Bug] [Fix-10673] Workflow recovery bug with failed tasks
(#10722)
ab046dae9d is described below
commit ab046dae9dd36e1d52a9b58e7964da416dd5bf32
Author: JinYong Li <[email protected]>
AuthorDate: Fri Jul 1 13:58:05 2022 +0800
[Bug] [Fix-10673] Workflow recovery bug with failed tasks (#10722)
* fix 10517
* fix dep warn bug
* fix recover bug
Co-authored-by: JinyLeeChina <[email protected]>
---
.../server/master/runner/WorkflowExecuteThread.java | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
index 39e903bdc2..1a0866f6f2 100644
---
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
+++
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
@@ -1125,6 +1125,22 @@ public class WorkflowExecuteThread implements Runnable {
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);
+ if (!killedList.isEmpty()) {
+ return true;
+ }
+ }
}
return dependFailedTask.size() > 0;
}