From 5a6f1c88a345a752cec11b574ac39d241961b838 Mon Sep 17 00:00:00 2001 From: Rick Cheng Date: Mon, 17 Jul 2023 21:43:34 +0800 Subject: [PATCH] [Fix-14503][Worker] Fix the problem of subprocess cannot be killed (#14504) Co-authored-by: xiangzihao <460888207@qq.com> --- .../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);