From 3360e61cb72c69e6a701059f9800bccf398829e4 Mon Sep 17 00:00:00 2001 From: Xi Hu <54018190+ixuh12@users.noreply.github.com> Date: Thu, 23 Jun 2022 11:12:37 -0400 Subject: [PATCH] cherry pick #35552 to release-6.1 Signed-off-by: ti-srebot --- br/pkg/backup/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/br/pkg/backup/client.go b/br/pkg/backup/client.go index abe4ce47df0b7..ca0ad560799b2 100644 --- a/br/pkg/backup/client.go +++ b/br/pkg/backup/client.go @@ -541,7 +541,9 @@ func (bc *Client) BackupRanges( progressCallBack func(ProgressUnit), ) error { init := time.Now() - defer log.Info("Backup Ranges", zap.Duration("take", time.Since(init))) + defer func() { + log.Info("Backup Ranges", zap.Duration("take", time.Since(init))) + }() if span := opentracing.SpanFromContext(ctx); span != nil && span.Tracer() != nil { span1 := span.Tracer().StartSpan("Client.BackupRanges", opentracing.ChildOf(span.Context()))