ChaoquanTao opened a new issue, #16437: URL: https://github.com/apache/dolphinscheduler/issues/16437
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened dynamic task periodically select wait_to_run subProcess instance, wrap it as command and insert it into db. And then MasterSchedulerBootstrap select these command to start workflow. If sub workflow executes too slow to update its state to running, the dynamic task may select the same subProcess again and start it again, cause several execution for the same subprocess. Myabe in MasterSchedulerBootstrap, if processInstanceExecCacheManager.contains(processInstance.getId(), we should just return? ``` if (processInstanceExecCacheManager.contains(processInstance.getId())) { log.error( "The workflow instance is already been cached, this case shouldn't be happened"); } ``` ### What you expected to happen dynamic task shouldn't reexecute same subprocess ### How to reproduce create a time-consuming dynamic subprocess, run the parent process, you will see it. ### Anything else _No response_ ### Version 3.2.x ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
