balajinima opened a new issue, #14032: URL: https://github.com/apache/dolphinscheduler/issues/14032
### 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 When killing tasks in Worker, the thread executing the task is not actually closed, so the task status is "kill" but it is still running in practice. This indirectly affects the ability to rerun the task.   ### What you expected to happen I believe that when closing a task, at least the task execution thread should be closed . This is because not all tasks will start a process, but all tasks must execute commands through a thread. ### How to reproduce Based on the current implementation, I came up with a method to close the thread. Here are the steps for reference: 1. In the WorkerExecService, maintain a futureMap for each task. 2. When closing a task, retrieve the future object from the futureMap and call the cancel() method.    ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] 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]
