Skip to content

Commit

Permalink
BR: fix backup ranges total time summary log (#35552) (#35702)
Browse files Browse the repository at this point in the history
close #35553
  • Loading branch information
ti-srebot committed Jun 26, 2023
1 parent bfae719 commit 7e00dc2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion br/pkg/backup/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down

0 comments on commit 7e00dc2

Please sign in to comment.