KaiSong-UK opened a new pull request, #18453:
URL: https://github.com/apache/dolphinscheduler/pull/18453

   ## Summary
   
   Fix issue #16789: When stopping a Flink task, the worker fails to kill the 
YARN application if the local shell process has already exited.
   
   ## Root Cause
   
   In `AbstractCommandExecutor.cancelApplication()`, when `process == null` 
(which happens when the Flink task's shell process has exited but the YARN 
application is still running), the method returns immediately without calling 
`ProcessUtils.cancelApplication(taskRequest)`. This means the YARN/K8s 
application is never cancelled.
   
   ## Fix
   
   Restructure the `cancelApplication()` method so that 
`ProcessUtils.cancelApplication(taskRequest)` is always called, regardless of 
whether `process` is null. When `process == null`, we log a warning and skip 
the process tree kill, but still attempt to cancel the YARN/K8s application.
   
   Closes #16789


-- 
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]

Reply via email to