Skip to content

Commit ade13f7

Browse files
D3Hunterti-chi-bot
authored andcommitted
This is an automated cherry-pick of pingcap#67612
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
1 parent a8ad696 commit ade13f7

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

pkg/disttask/framework/taskexecutor/task_executor.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,17 @@ func (e *BaseTaskExecutor) Run() {
381381
// task executor keeps running its subtasks even though some subtask
382382
// might have failed, we rely on scheduler to detect the error, and
383383
// notify task executor or manager to cancel.
384+
<<<<<<< HEAD:pkg/disttask/framework/taskexecutor/task_executor.go
384385
e.logger.Error("run subtask failed", zap.Error(err))
386+
=======
387+
if llog.IsContextCanceledError(err) {
388+
// Context canceled is expected when scheduler/manager cancels executor,
389+
// so log as info instead of a subtask failure.
390+
e.sampleLogger.Info("subtask run canceled by context", llog.ShortError(err))
391+
} else {
392+
e.sampleLogger.Error("run subtask failed", zap.Error(err))
393+
}
394+
>>>>>>> 79685135013 (pkg/dxf: avoid misleading error log on context cancel (#67612)):pkg/dxf/framework/taskexecutor/task_executor.go
385395
} else {
386396
// if we run a subtask successfully, we will try to run next subtask
387397
// immediately for once.

0 commit comments

Comments
 (0)