File tree Expand file tree Collapse file tree
pkg/disttask/framework/taskexecutor Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments