You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by we...@apache.org on 2022/08/11 05:38:59 UTC

[dolphinscheduler] branch dev updated: [Fix-11413] Cannot set task status to kill if the task is not in running(#11414)

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

wenjun 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 496c2d4bfa [Fix-11413] Cannot set task status to kill if the task is not in running(#11414)
496c2d4bfa is described below

commit 496c2d4bfa9bcf72bd8c90a7732844b543c15610
Author: Wenjun Ruan <we...@apache.org>
AuthorDate: Thu Aug 11 13:38:49 2022 +0800

    [Fix-11413] Cannot set task status to kill if the task is not in running(#11414)
---
 .../server/master/runner/task/CommonTaskProcessor.java         | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/CommonTaskProcessor.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/CommonTaskProcessor.java
index 46e310f44c..24b7fd0a7c 100644
--- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/CommonTaskProcessor.java
+++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/CommonTaskProcessor.java
@@ -144,12 +144,10 @@ public class CommonTaskProcessor extends BaseTaskProcessor {
             if (taskInstance.getState().isFinished()) {
                 return true;
             }
-            if (StringUtils.isBlank(taskInstance.getHost())) {
-                taskInstance.setState(TaskExecutionStatus.KILL);
-                taskInstance.setEndTime(new Date());
-                processService.updateTaskInstance(taskInstance);
-                return true;
-            }
+            // we don't wait the kill response
+            taskInstance.setState(TaskExecutionStatus.KILL);
+            taskInstance.setEndTime(new Date());
+            processService.updateTaskInstance(taskInstance);
 
             TaskKillRequestCommand killCommand = new TaskKillRequestCommand();
             killCommand.setTaskInstanceId(taskInstance.getId());