-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[finagle-core] fix ExponentialJittered and Rng.nextLong(n)
# Problems - Rng.nextLong(n) can be < 0 - ExponentialJittered first duration is always `start` without any jitter, so all services make the first retry simultaneously, potentially overwhelming a target service even more - ExponentialJittered.duration can be > ExponentialJittered.next.duration for unlimited number of times, because it chooses a random value starting from 1 # Solution Change `ExponentialJittered` to return a random number between `start/2` and `start + start/2`. Advance `start` as `start * 2` for each `next` `ExponentialJittered`. JIRA Issues: STOR-8883 Differential Revision: https://phabricator.twitter.biz/D1182252
- Loading branch information
Anton Ivanov
authored and
jenkins
committed
Nov 13, 2024
1 parent
bc815d5
commit 171b881
Showing
5 changed files
with
95 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters