diff --git a/br/pkg/lightning/backend/local/local.go b/br/pkg/lightning/backend/local/local.go index 1c6eb1e7cb8d6..c585f6891a4c8 100644 --- a/br/pkg/lightning/backend/local/local.go +++ b/br/pkg/lightning/backend/local/local.go @@ -1560,7 +1560,10 @@ func (local *Backend) doImport(ctx context.Context, engine *Engine, regionRanges if err != nil { firstErr.Set(err) workerCancel() - _ = workGroup.Wait() + err2 := workGroup.Wait() + if !common.IsContextCanceledError(err2) { + log.FromContext(ctx).Error("worker meets error", zap.Error(err2)) + } return firstErr.Get() }