Skip to content

Commit 59685d8

Browse files
authored
[1.3.6-prepare]work flow would running if task is killed by manual. (#5363)
pr #5362 issue #5349
1 parent 709dfe2 commit 59685d8

File tree

2 files changed

+8
-3
lines changed
  • dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums
  • dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner

2 files changed

+8
-3
lines changed

Diff for: dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/DependResult.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public enum DependResult {
2626
* 0 success
2727
* 1 waiting
2828
* 2 failed
29+
* 3 non execution
2930
*/
30-
SUCCESS, WAITING, FAILED
31+
SUCCESS, WAITING, FAILED, NON_EXEC
3132
}

Diff for: dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ private DependResult isTaskDepsComplete(String taskName) {
527527
}
528528
ExecutionStatus depTaskState = completeTaskList.get(depsNode).getState();
529529
if(depTaskState.typeIsPause() || depTaskState.typeIsCancel()){
530-
return DependResult.WAITING;
530+
return DependResult.NON_EXEC;
531531
}
532532
// ignore task state if current task is condition
533533
if(taskNode.isConditionsTask()){
@@ -1017,7 +1017,11 @@ private void submitStandByTask(){
10171017
dependFailedTask.put(task.getName(), task);
10181018
removeTaskFromStandbyList(task);
10191019
logger.info("task {},id:{} depend result : {}",task.getName(), task.getId(), dependResult);
1020-
}
1020+
} else if (DependResult.NON_EXEC == dependResult) {
1021+
// for some reasons(depend task pause/stop) this task would not be submit
1022+
removeTaskFromStandbyList(task);
1023+
logger.info("remove task {},id:{} , because depend result : {}", task.getName(), task.getId(), dependResult);
1024+
}
10211025
}
10221026
} catch (Exception e) {
10231027
logger.error("submit standby task error",e);

0 commit comments

Comments
 (0)