Browse Source

fix bug: 5349, work flow would running if task is killed by manual. (#5362)

Co-authored-by: baoliang <baoliang@analysys.com.cn>
pull/3/MERGE
bao liang 4 years ago committed by GitHub
parent
commit
75d1ad645c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/DependResult.java
  2. 6
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java

3
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/DependResult.java

@ -26,6 +26,7 @@ public enum DependResult {
* 0 success * 0 success
* 1 waiting * 1 waiting
* 2 failed * 2 failed
* 3 non execution
*/ */
SUCCESS, WAITING, FAILED SUCCESS, WAITING, FAILED, NON_EXEC
} }

6
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java

@ -617,7 +617,7 @@ public class MasterExecThread implements Runnable {
} }
ExecutionStatus depTaskState = completeTaskList.get(depsNode).getState(); ExecutionStatus depTaskState = completeTaskList.get(depsNode).getState();
if (depTaskState.typeIsPause() || depTaskState.typeIsCancel()) { if (depTaskState.typeIsPause() || depTaskState.typeIsCancel()) {
return DependResult.WAITING; return DependResult.NON_EXEC;
} }
// ignore task state if current task is condition // ignore task state if current task is condition
if (taskNode.isConditionsTask()) { if (taskNode.isConditionsTask()) {
@ -1148,6 +1148,10 @@ public class MasterExecThread implements Runnable {
dependFailedTask.put(task.getName(), task); dependFailedTask.put(task.getName(), task);
removeTaskFromStandbyList(task); removeTaskFromStandbyList(task);
logger.info("task {},id:{} depend result : {}", task.getName(), task.getId(), dependResult); logger.info("task {},id:{} depend result : {}", task.getName(), task.getId(), dependResult);
} else if (DependResult.NON_EXEC == dependResult) {
// for some reasons(depend task pause/stop) this task would not be submit
removeTaskFromStandbyList(task);
logger.info("remove task {},id:{} , because depend result : {}", task.getName(), task.getId(), dependResult);
} }
} }
} catch (Exception e) { } catch (Exception e) {

Loading…
Cancel
Save