[#398] Fix parameter parsing in bucket retryer
Some checks failed
/ DCO (pull_request) Successful in 2m0s
/ Builds (1.20) (pull_request) Successful in 2m16s
/ Builds (1.21) (pull_request) Successful in 1m39s
/ Vulncheck (pull_request) Failing after 2m7s
/ Lint (pull_request) Successful in 4m25s
/ Tests (1.20) (pull_request) Successful in 1m24s
/ Tests (1.21) (pull_request) Successful in 2m34s
Some checks failed
/ DCO (pull_request) Successful in 2m0s
/ Builds (1.20) (pull_request) Successful in 2m16s
/ Builds (1.21) (pull_request) Successful in 1m39s
/ Vulncheck (pull_request) Failing after 2m7s
/ Lint (pull_request) Successful in 4m25s
/ Tests (1.20) (pull_request) Successful in 1m24s
/ Tests (1.21) (pull_request) Successful in 2m34s
RetryStrategyExponential should use jitter backoff instead of constant delay function Signed-off-by: Alex Vanin <a.vanin@yadro.com>
This commit is contained in:
parent
caea6e4208
commit
0e3dd2ff19
1 changed files with 1 additions and 1 deletions
|
@ -939,7 +939,7 @@ func (h *handler) putBucketSettingsRetryer() aws.RetryerV2 {
|
||||||
return retry.NewStandard(func(options *retry.StandardOptions) {
|
return retry.NewStandard(func(options *retry.StandardOptions) {
|
||||||
options.MaxAttempts = h.cfg.RetryMaxAttempts()
|
options.MaxAttempts = h.cfg.RetryMaxAttempts()
|
||||||
options.MaxBackoff = h.cfg.RetryMaxBackoff()
|
options.MaxBackoff = h.cfg.RetryMaxBackoff()
|
||||||
if h.cfg.RetryStrategy() == RetryStrategyConstant {
|
if h.cfg.RetryStrategy() == RetryStrategyExponential {
|
||||||
options.Backoff = retry.NewExponentialJitterBackoff(options.MaxBackoff)
|
options.Backoff = retry.NewExponentialJitterBackoff(options.MaxBackoff)
|
||||||
} else {
|
} else {
|
||||||
options.Backoff = retry.BackoffDelayerFunc(func(int, error) (time.Duration, error) {
|
options.Backoff = retry.BackoffDelayerFunc(func(int, error) (time.Duration, error) {
|
||||||
|
|
Loading…
Reference in a new issue