From e5c0b6b101fbb7add485df4f63331c7bcc944467 Mon Sep 17 00:00:00 2001 From: Jianjun Liao <36503113+Leavrth@users.noreply.github.com> Date: Wed, 14 Dec 2022 18:50:52 +0800 Subject: [PATCH] br: fix err overwrite (#39935) close pingcap/tidb#39934 --- br/pkg/task/stream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/pkg/task/stream.go b/br/pkg/task/stream.go index b33459bb98e2e..8596eb89d6974 100644 --- a/br/pkg/task/stream.go +++ b/br/pkg/task/stream.go @@ -1177,7 +1177,7 @@ func restoreStream( return errors.Trace(err) } defer func() { - if err = restoreGc(); err != nil { + if err := restoreGc(); err != nil { log.Error("failed to set gc enabled", zap.Error(err)) } }()