guoshupei opened a new issue #9065: URL: https://github.com/apache/dolphinscheduler/issues/9065
### 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 BG : The Process Instance have only one task In the method of `submitPostNode`, the task successfully added to `readyToSubmitTaskQueue`, then submit task from queue, if submit failed, such as DB error, the `taskFailedSubmit` is true and `readyToSubmitTaskQueue` size is not empty. when execute the method of `updateProcessInstanceState`, case one: FailureStrategy is END, it return state of `FAILURE`, and update state; case two: FailureStrategy is CONTINUE, it return state of `RUNNING_EXECUTION`, and remain the same state forever; More seriously, both cases will cause `processInstanceExecCacheManager` not remove `WorkflowExecuteThread`   ### What you expected to happen the process instance can update the state normally and can terminate normally. I hope it will be resolved in v2.0.6 ### How to reproduce Refer to `What happened` ### Anything else _No response_ ### Version dev ### 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]
