Skip to content

Commit a324a33

Browse files
author
Yen-Cheng Chou
committed
Remove redundant condition checking for Sleep().
1 parent 18c94e9 commit a324a33

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

retrieval/transform.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,7 @@ func (b *sampleBuilder) getSeriesWithRetry(ctx context.Context, sample tsdb.RefS
148148
}
149149
level.Warn(b.logger).Log("msg", "failed to get seriesCacheEntry", "err", err)
150150
backoff = exponential(backoff)
151-
if backoff > 0 {
152-
time.Sleep(backoff)
153-
}
151+
time.Sleep(backoff)
154152
}
155153
return entry, ok, nil
156154
}

0 commit comments

Comments
 (0)