From 6c5d4d725c1888a61ced9c11c2bf4fb77af24ffb Mon Sep 17 00:00:00 2001 From: D3Hunter Date: Thu, 19 Oct 2023 16:04:13 +0800 Subject: [PATCH] log worker error --- br/pkg/lightning/backend/local/local.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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() }