From ade13f71d81549988f6654cbc0b9f4d114a12a33 Mon Sep 17 00:00:00 2001 From: D3Hunter Date: Fri, 10 Apr 2026 02:06:24 +0800 Subject: [PATCH] This is an automated cherry-pick of #67612 Signed-off-by: ti-chi-bot --- pkg/disttask/framework/taskexecutor/task_executor.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/disttask/framework/taskexecutor/task_executor.go b/pkg/disttask/framework/taskexecutor/task_executor.go index 3a49599902a97..f3a445de441b0 100644 --- a/pkg/disttask/framework/taskexecutor/task_executor.go +++ b/pkg/disttask/framework/taskexecutor/task_executor.go @@ -381,7 +381,17 @@ func (e *BaseTaskExecutor) Run() { // task executor keeps running its subtasks even though some subtask // might have failed, we rely on scheduler to detect the error, and // notify task executor or manager to cancel. +<<<<<<< HEAD:pkg/disttask/framework/taskexecutor/task_executor.go e.logger.Error("run subtask failed", zap.Error(err)) +======= + if llog.IsContextCanceledError(err) { + // Context canceled is expected when scheduler/manager cancels executor, + // so log as info instead of a subtask failure. + e.sampleLogger.Info("subtask run canceled by context", llog.ShortError(err)) + } else { + e.sampleLogger.Error("run subtask failed", zap.Error(err)) + } +>>>>>>> 79685135013 (pkg/dxf: avoid misleading error log on context cancel (#67612)):pkg/dxf/framework/taskexecutor/task_executor.go } else { // if we run a subtask successfully, we will try to run next subtask // immediately for once.