From 0e3dd2ff195219c4dfbd83794d1ff93c8d32fa73 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Wed, 3 Jul 2024 13:42:24 +0300 Subject: [PATCH] [#398] Fix parameter parsing in bucket retryer RetryStrategyExponential should use jitter backoff instead of constant delay function Signed-off-by: Alex Vanin --- api/handler/put.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/handler/put.go b/api/handler/put.go index 3cde82e..2b21705 100644 --- a/api/handler/put.go +++ b/api/handler/put.go @@ -939,7 +939,7 @@ func (h *handler) putBucketSettingsRetryer() aws.RetryerV2 { return retry.NewStandard(func(options *retry.StandardOptions) { options.MaxAttempts = h.cfg.RetryMaxAttempts() options.MaxBackoff = h.cfg.RetryMaxBackoff() - if h.cfg.RetryStrategy() == RetryStrategyConstant { + if h.cfg.RetryStrategy() == RetryStrategyExponential { options.Backoff = retry.NewExponentialJitterBackoff(options.MaxBackoff) } else { options.Backoff = retry.BackoffDelayerFunc(func(int, error) (time.Duration, error) {