From 56580abac3d72fc942f0772b093f8f4c175143ff Mon Sep 17 00:00:00 2001 From: pegasas Date: Thu, 1 Feb 2024 20:47:46 +0800 Subject: [PATCH] [Bug] [Master] kill task when TaskInstance set TimeoutFailed --- .../BaseTaskExecuteRunnableTimeoutOperator.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/operator/BaseTaskExecuteRunnableTimeoutOperator.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/operator/BaseTaskExecuteRunnableTimeoutOperator.java index ef9dc8090119..27ab1f99fa4d 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/operator/BaseTaskExecuteRunnableTimeoutOperator.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/operator/BaseTaskExecuteRunnableTimeoutOperator.java @@ -38,18 +38,8 @@ public BaseTaskExecuteRunnableTimeoutOperator(TaskInstanceDao taskInstanceDao) { @Override public void operate(DefaultTaskExecuteRunnable taskExecuteRunnable) { - // Right now, if the task is running in worker, the timeout strategy will be handled at worker side. - // if the task is in master, the timeout strategy will be handled at master side. - // todo: we should unify this, the master only need to handle the timeout strategy. and send request to worker - // to kill the task, if the strategy is timeout_failed. TaskInstance taskInstance = taskExecuteRunnable.getTaskInstance(); TaskTimeoutStrategy taskTimeoutStrategy = taskInstance.getTaskDefine().getTimeoutNotifyStrategy(); - if (TaskTimeoutStrategy.FAILED != taskTimeoutStrategy - && TaskTimeoutStrategy.WARNFAILED != taskTimeoutStrategy) { - log.warn("TaskInstance: {} timeout, the current timeout strategy is {}, will continue running", - taskInstance.getName(), taskTimeoutStrategy.name()); - return; - } try { timeoutTaskInstanceInDB(taskInstance); killRemoteTaskInstanceInThreadPool(taskInstance);