diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java index 4502b86cf9..8c3712f838 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java @@ -187,12 +187,12 @@ public class StateWheelExecuteThread extends Thread { if (taskInstance == null) { continue; } - if (taskInstance.taskCanRetry() && taskInstance.retryTaskIntervalOverTime()) { + + if (!taskInstance.getState().typeIsFinished() && (taskInstance.isSubProcess() || taskInstance.isDependTask())) { addTaskStateChangeEvent(taskInstance); - taskInstanceRetryCheckList.remove(taskInstance.getId()); - } - if (taskInstance.isSubProcess() || taskInstance.isDependTask()) { + } else if (taskInstance.taskCanRetry() && taskInstance.retryTaskIntervalOverTime()) { addTaskStateChangeEvent(taskInstance); + taskInstanceRetryCheckList.remove(taskInstance.getId()); } } } diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java index 9c5eee7b5d..c25d9ad5e0 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java @@ -437,6 +437,8 @@ public class WorkflowExecuteThread { stateWheelExecuteThread.addTask4RetryCheck(task); } else { submitStandByTask(); + stateWheelExecuteThread.removeTask4TimeoutCheck(task); + stateWheelExecuteThread.removeTask4RetryCheck(task); } return; }