-
Notifications
You must be signed in to change notification settings - Fork 5k
[Fix-17004] Fix process termination logic in cancelApplication method #17005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…cancelApplication
...k-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java
Fixed
Show fixed
Hide fixed
...k-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java
Fixed
Show fixed
Hide fixed
ruanwenjun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this PR generating by AI? This could potentially lead to high code duplicate with other project.
...k-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/AbstractCommandExecutor.java
Outdated
Show resolved
Hide resolved
...r-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/ProcessUtils.java
Outdated
Show resolved
Hide resolved
...r-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/ProcessUtils.java
Outdated
Show resolved
Hide resolved
...r-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/ProcessUtils.java
Outdated
Show resolved
Hide resolved
At first, I use cursor generate PR code, but there're many errors it generated, so I have to update a lot to solve this issue. |
|
@ruanwenjun Thanks for the review, I have updated the PR, please help review it when you're free, thx |
It's better to remove the extra code in #17005 (comment) |
…cancelApplication
Thanks for the suggestion, I have removed this logic, please help review it when you're free, thx |
| boolean killed = ProcessUtils.kill(taskRequest); | ||
| if (killed) { | ||
| log.info("Process tree for task: {} is killed or already finished, pid: {}", | ||
| taskRequest.getTaskAppId(), taskRequest.getProcessId()); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
TaskExecutionContext.getTaskAppId
| taskRequest.getTaskAppId(), taskRequest.getProcessId()); | ||
| } else { | ||
| log.error("Failed to kill process tree for task: {}, pid: {}", | ||
| taskRequest.getTaskAppId(), taskRequest.getProcessId()); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
TaskExecutionContext.getTaskAppId
|
ruanwenjun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
SbloodyS
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
…hod (apache#17005) [Fix-17316][Task-API] Add check process status after killing task (apache#17320) [Fix-17436][Workflow]Task timeout kill throw exception (apache#17437 改造支持seatunnel集群模式停止任务



close #17004