[Bug] [TaskExecutionRunnable] Sub workflow task always repeat run in master-server failover #16767
Open
3 tasks done
Labels
question
Further information is requested
Search before asking
What happened
Normally,
FailoverCoordinator.getFailoverWorkflowsForMaster()
finds all workflows that need failover. When the sub-workflow task'sTaskExecutionRunnable.failover()
method is called,takeOverTaskFromExecutor()
now returnsfalse
if the task is a logic task. This results in the creation of a new sub-workflow task instance and the publication of itsTaskStartLifecycleEvent
, causing the sub-workflow to run again during the failover process.dolphinscheduler/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/runnable/TaskExecutionRunnable.java
Lines 120 to 135 in 0719949
dolphinscheduler/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/runnable/TaskExecutionRunnable.java
Lines 160 to 164 in 0719949
so i think it would be better to check the sub-workflow instance properly(by dao or server communicate) and take it over, instead of creating a whole new task instance.
What you expected to happen
Take over sub-workflow task if the sub-workflow instance is in good status.
How to reproduce
execute a workflow with sub-workflow, restart the master-server, query the database
Anything else
No response
Version
dev
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: