From f86b82351a66d8b7a8ee9c859f002feb409fd52f 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 0f71e7eb..94cc0f35 100644 --- a/api/handler/put.go +++ b/api/handler/put.go @@ -796,7 +796,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) {