-
Notifications
You must be signed in to change notification settings - Fork 131
feat: exponential random retry #223
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #223 +/- ##
============================================
- Coverage 88.53% 88.52% -0.02%
Complexity 449 449
============================================
Files 146 146
Lines 5724 5743 +19
Branches 274 277 +3
============================================
+ Hits 5068 5084 +16
Misses 565 565
- Partials 91 94 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are just "code style" requested changes:
Co-authored-by: Jakub Bednář <jakub.bednar@gmail.com>
Co-authored-by: Jakub Bednář <jakub.bednar@gmail.com>
Co-authored-by: Jakub Bednář <jakub.bednar@gmail.com>
Proposed Changes
Improves exponential random retry strategy in write api like in python client influxdata/influxdb-client-python#225
Delay is computed using random exponential backoff as a random value within the interval
retryInterval * exponentialBase^(attempts-1)
andretryInterval * exponentialBase^(attempts)
.Example for
retryInterval=5_000, exponentialBase=2, maxRetryDelay=125_000, total=5
Retry delays are random distributed values within the ranges of
[5_000-10_000, 10_000-20_000, 20_000-40_000, 40_000-80_000, 80_000-125_000]
Checklist
mvn test
completes successfully