This is an automated email from the ASF dual-hosted git repository.

kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 75d1ad6  fix bug: 5349, work flow would running if task is killed by 
manual. (#5362)
75d1ad6 is described below

commit 75d1ad645c994feadf157fb2343141b3d9ec49bf
Author: bao liang <[email protected]>
AuthorDate: Fri Apr 23 14:29:26 2021 +0800

    fix bug: 5349, work flow would running if task is killed by manual. (#5362)
    
    Co-authored-by: baoliang <[email protected]>
---
 .../java/org/apache/dolphinscheduler/common/enums/DependResult.java | 3 ++-
 .../dolphinscheduler/server/master/runner/MasterExecThread.java     | 6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/DependResult.java
 
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/DependResult.java
index 3e305f3..f906c86 100644
--- 
a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/DependResult.java
+++ 
b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/DependResult.java
@@ -26,6 +26,7 @@ public enum DependResult {
      * 0 success
      * 1 waiting
      * 2 failed
+     * 3 non execution
      */
-    SUCCESS, WAITING, FAILED
+    SUCCESS, WAITING, FAILED, NON_EXEC
 }
diff --git 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
index d93e9e6..19e10b4 100644
--- 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
+++ 
b/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();
             if (depTaskState.typeIsPause() || depTaskState.typeIsCancel()) {
-                return DependResult.WAITING;
+                return DependResult.NON_EXEC;
             }
             // ignore task state if current task is condition
             if (taskNode.isConditionsTask()) {
@@ -1148,6 +1148,10 @@ public class MasterExecThread implements Runnable {
                     dependFailedTask.put(task.getName(), task);
                     removeTaskFromStandbyList(task);
                     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) {

Reply via email to