This is an automated email from the ASF dual-hosted git repository.

zihaoxiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 5a6f1c88a3 [Fix-14503][Worker] Fix the problem of subprocess cannot be 
killed (#14504)
5a6f1c88a3 is described below

commit 5a6f1c88a345a752cec11b574ac39d241961b838
Author: Rick Cheng <[email protected]>
AuthorDate: Mon Jul 17 21:43:34 2023 +0800

    [Fix-14503][Worker] Fix the problem of subprocess cannot be killed (#14504)
    
    Co-authored-by: xiangzihao <[email protected]>
---
 .../server/worker/processor/WorkerTaskKillProcessor.java               | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/WorkerTaskKillProcessor.java
 
b/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/WorkerTaskKillProcessor.java
index 01bd5c85e0..64a9240997 100644
--- 
a/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/WorkerTaskKillProcessor.java
+++ 
b/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/processor/WorkerTaskKillProcessor.java
@@ -85,6 +85,7 @@ public class WorkerTaskKillProcessor implements 
WorkerRpcProcessor {
                 return;
             }
 
+            boolean result = doKill(taskExecutionContext);
             this.cancelApplication(taskInstanceId);
 
             int processId = taskExecutionContext.getProcessId();
@@ -97,8 +98,6 @@ public class WorkerTaskKillProcessor implements 
WorkerRpcProcessor {
                 return;
             }
 
-            boolean result = doKill(taskExecutionContext);
-
             taskExecutionContext.setCurrentExecutionStatus(
                     result ? TaskExecutionStatus.SUCCESS : 
TaskExecutionStatus.FAILURE);
             sendTaskKillResponseCommand(channel, message.getOpaque(), 
taskExecutionContext);

Reply via email to