reele commented on issue #16767: URL: https://github.com/apache/dolphinscheduler/issues/16767#issuecomment-2833058865
> > > [@ruanwenjun](https://github.com/ruanwenjun) In dev branch now, there's a better way to takeover sub-workflow task in failover, i made a branch to implement: > > > https://github.com/apache/dolphinscheduler/compare/dev...reele:fix-takeover-workflow-in-failover?expand=1 > > > after refactored `TaskExecutorClient`, takeover is called before initializeTaskExecutionContext, so there should only check workflow instance in takeover, and put the `TaskExecutor` to `taskExecutorRepository` in `TaskEngine`, and it will work for good. > > Can we move the logic to `SubWorkflowLogicTask `? when we failover a task instance(e.g. sub workflow task instance), we directly generate a new task instance which contains the pre runtime context, once the task instance started, it will check if it is a failover task instance, and if it can take-over. Since different logic task instances might have its own logic to judge whether it can take-over. You can find a todo at `SubWorkflowLogicTask#initializeSubWorkflowInstance` it's indeed a simpler approach - my method impacted architecture design, i tried. Also, during failover, the master directly starts sub-workflows, which creates a split from SubWorkflowLogicTask's processing flow, i think it would be better to have SubWorkflowLogicTask fully handle triggering fault-tolerant sub-workflows. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
