From c069bc0fcc1b972e0c0b14f2c0e4aa7f5a82040e Mon Sep 17 00:00:00 2001 From: fengou1 <85682690+fengou1@users.noreply.github.com> Date: Mon, 20 Dec 2021 08:09:45 +0800 Subject: [PATCH] br: add error handling for group context cancel when restore file is corrupted (#30190) close pingcap/tidb#30135 --- pkg/restore/pipeline_items.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/restore/pipeline_items.go b/pkg/restore/pipeline_items.go index 1bd7502f3..ce476b196 100644 --- a/pkg/restore/pipeline_items.go +++ b/pkg/restore/pipeline_items.go @@ -360,6 +360,7 @@ func (b *tikvSender) restoreWorker(ctx context.Context, ranges <-chan drainResul eg.Go(func() error { e := b.client.RestoreFiles(ectx, files, r.result.RewriteRules, b.updateCh) if e != nil { + r.done() return e } log.Info("restore batch done", rtree.ZapRanges(r.result.Ranges))