This is an automated email from the ASF dual-hosted git repository.
wenjun 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 045383fd5a [Fix-17030] Fix one task might be duplicate trigger if
exist multiple predecessors (#17038)
045383fd5a is described below
commit 045383fd5ac7fd70fa8ec40f0b35a68695bffc79
Author: Wenjun Ruan <[email protected]>
AuthorDate: Fri Mar 7 19:08:19 2025 +0800
[Fix-17030] Fix one task might be duplicate trigger if exist multiple
predecessors (#17038)
---
.../server/master/engine/graph/IWorkflowExecutionGraph.java | 3 ++-
.../server/master/engine/graph/WorkflowExecutionGraph.java | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git
a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/IWorkflowExecutionGraph.java
b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/IWorkflowExecutionGraph.java
index 1c3af50915..d9266b721c 100644
---
a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/IWorkflowExecutionGraph.java
+++
b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/IWorkflowExecutionGraph.java
@@ -115,7 +115,8 @@ public interface IWorkflowExecutionGraph {
/**
* Check whether the given task can be trigger now.
- * <p> The task can be trigger if all the predecessors are finished and
all predecessors are not failure/pause/kill.
+ * <p> The task can be trigger only all the predecessors are finished and
all predecessors are not failure/pause/kill.
+ * <p> Once the task has been triggered, then will also return false.
*/
boolean isTriggerConditionMet(final ITaskExecutionRunnable
taskExecutionRunnable);
diff --git
a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowExecutionGraph.java
b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowExecutionGraph.java
index 2439d9f840..a9ce38cc7b 100644
---
a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowExecutionGraph.java
+++
b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/graph/WorkflowExecutionGraph.java
@@ -181,6 +181,10 @@ public class WorkflowExecutionGraph implements
IWorkflowExecutionGraph {
@Override
public boolean isTriggerConditionMet(final ITaskExecutionRunnable
taskExecutionRunnable) {
+ if (isTaskExecutionRunnableActive(taskExecutionRunnable)
+ || isTaskExecutionRunnableInActive(taskExecutionRunnable)) {
+ return false;
+ }
return getPredecessors(taskExecutionRunnable.getName())
.stream()
.allMatch(predecessor ->
isTaskExecutionRunnableInActive(predecessor)