-
Notifications
You must be signed in to change notification settings - Fork 975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
decorrelatedJitter and fullJitter delay calculation overflows #2115
Comments
The delay counter starts at |
Hey, thanks for your reply. My bad! Though I updated my code to start attempts at
|
Upon further investigation, The full jitter implementation returns zero upon reaching 2^63 because the long value range exceeds. We should update the code to use the upper bound for jittering instead of falling back to zero. |
Lettuce now considers overflow states and the previous delay time unit conversion is correct to avoid zero-delays.
Lettuce now considers overflow states and the previous delay time unit conversion is correct to avoid zero-delays.
That's fixed now, thanks for reporting the issue. |
Bug Report
Current Behavior
Delay.decorrelatedJitter()
always returns the same value. If used with default setup - 0.I couldn't find any limitation on attempts in
ConnectionWatchdog
, that's why I decided to testDelay.fullJitter()
with a high number of attempts (100+). If I use any other value forbase
except the default one I getIllegalArgumentException: bound must be greater than origin
.Stack trace
Input Code
decorrelatedJitter
fullJitter
Expected behavior/code
Environment
The text was updated successfully, but these errors were encountered: