diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-01-30 20:00:40 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-01-30 20:15:33 +0300 |
commit | b77c567d86c1c64a24e839c81b1ce0a7517cf3a1 (patch) | |
tree | 79f2d560b2cea2d19d40ef08c07d8e06039dcea4 /yt | |
parent | 7e4754cb6ffe5a488141eb8773d1810b0798ec64 (diff) | |
download | ydb-b77c567d86c1c64a24e839c81b1ce0a7517cf3a1.tar.gz |
Intermediate changes
Diffstat (limited to 'yt')
-rw-r--r-- | yt/yt/core/concurrency/retrying_periodic_executor.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/yt/yt/core/concurrency/retrying_periodic_executor.cpp b/yt/yt/core/concurrency/retrying_periodic_executor.cpp index 3ac46ea6d1..697a7939fb 100644 --- a/yt/yt/core/concurrency/retrying_periodic_executor.cpp +++ b/yt/yt/core/concurrency/retrying_periodic_executor.cpp @@ -25,6 +25,7 @@ TRetryingInvocationTimePolicy::TRetryingInvocationTimePolicy( , Backoff_(options) { CachedBackoffDuration_.store(options.MinBackoff, std::memory_order::relaxed); + CachedBackoffMultiplier_.store(options.BackoffJitter, std::memory_order::relaxed); CachedBackoffJitter_.store(options.BackoffJitter,std::memory_order::relaxed); } @@ -69,18 +70,21 @@ void TRetryingInvocationTimePolicy::SetOptions( } if (backoffOptions) { + Backoff_.UpdateOptions(*backoffOptions); + + if (!IsInBackoffMode()) { + Backoff_.Restart(); + } + + CachedBackoffDuration_.store( + Backoff_.GetBackoff(), + std::memory_order::relaxed); CachedBackoffMultiplier_.store( backoffOptions->BackoffMultiplier, std::memory_order::relaxed); CachedBackoffJitter_.store( backoffOptions->BackoffJitter, std::memory_order::relaxed); - - if (!IsInBackoffMode()) { - Backoff_.Restart(); - } - - Backoff_.UpdateOptions(*backoffOptions); } } |