From 3af0929c9d86e2e57355ec2221a1d6b77b5afe33 Mon Sep 17 00:00:00 2001 From: zhangdong <493738387@qq.com> Date: Fri, 16 Aug 2024 16:49:50 +0800 Subject: [PATCH] [fix](mtmv)Fix cancelled tasks with running status (#39424) The state of writing the log first and changing it later resulted in the memory state being cancelled and the state after restarting being running --- .../src/main/java/org/apache/doris/job/task/AbstractTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/job/task/AbstractTask.java b/fe/fe-core/src/main/java/org/apache/doris/job/task/AbstractTask.java index 3ccef940cafc67..f78446aaf85cbf 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/job/task/AbstractTask.java +++ b/fe/fe-core/src/main/java/org/apache/doris/job/task/AbstractTask.java @@ -137,8 +137,8 @@ public void onSuccess() throws JobException { @Override public void cancel() throws JobException { try { - executeCancelLogic(); status = TaskStatus.CANCELED; + executeCancelLogic(); } catch (Exception e) { log.warn("cancel task failed, job id is {}, task id is {}", jobId, taskId, e); throw new JobException(e);