Skip to content

Commit 0443a18

Browse files
committed
Stop AWS Retryer if context is cancelled
Ingester.flushUserSeries() puts a timeout on the context, so don't retry for longer than that. Signed-off-by: Bryan Boreham <[email protected]>
1 parent b0eadb4 commit 0443a18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/chunk/aws/retryer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (r *retryer) RetryRules(req *request.Request) time.Duration {
4242

4343
// ShouldRetry returns if the failed request is retryable.
4444
func (r *retryer) ShouldRetry(req *request.Request) bool {
45-
return req.IsErrorRetryable() || req.IsErrorThrottle()
45+
return r.Ongoing() && (req.IsErrorRetryable() || req.IsErrorThrottle())
4646
}
4747

4848
// MaxRetries is the number of times a request may be retried before

0 commit comments

Comments
 (0)