fix(timer-utils): cap exponential backoff factor and format attempt count string cleanly - #23283
Open
yappermoar-boop wants to merge 3 commits into
Conversation
…ount string cleanly
Contributor
|
Can you please explain under which circumstances the overflow might happen and why it's ok to cap, and why 62.0? Also please write a test case for the overflow in the test for this class and make sure it fails without your change. |
Author
|
Hi @paulbrauner-da ,
|
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
I have two remarks:
|
Author
|
Hi @paulbrauner-da , I have completed both updates:
I have force-pushed the updated branch! |
Contributor
|
/azp run |
Contributor
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
The PR doesn't compile. Please really do run the test locally and don't rely on us running the CI to discover that the PR doesn't compile. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Capped exponential backoff power factor using attempts.toDouble.min(62.0) in RetryStrategy.scala to prevent arithmetic overflow to Double.PositiveInfinity when multiplying FiniteDuration. Also formatted attempts count string using .fold(...) to avoid printing "Some(5)" in TooManyAttemptsException messages.