Add a random exponential wait strategy; Fixes #28#50
Open
NJAldwin wants to merge 1 commit intorholder:masterfrom
Open
Add a random exponential wait strategy; Fixes #28#50NJAldwin wants to merge 1 commit intorholder:masterfrom
NJAldwin wants to merge 1 commit intorholder:masterfrom
Conversation
This adds a variant of the exponential wait strategy that waits for a random time between the minimum provided time and an exponentially increasing maximum time (under a maximum provided time). This is similar to https://en.wikipedia.org/wiki/Exponential_backoff
Author
|
@rholder any chance you'll be able to take a look at this sometime relatively soon? (no rush, just wondering if I should just implement this in our code for now or wait for this to be merged) |
Owner
|
This looks pretty good, and it's first on my TODO list of maintenance when I circle back to this project. I should have bandwidth to ship something this week. Keep pinging this issue as a reminder if you don't see some movement soon. |
There was a problem hiding this comment.
I assume you used a private static final Random for consistency with the existing code; I wonder if it's worth switching over to a shared ThreadLocalRandom?
|
Any chance of committing and releasing this feature soon? Thanks. |
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.
This adds a variant of the exponential wait strategy that waits for a
random time between the minimum provided time and an exponentially
increasing maximum time (under a maximum provided time). This is
similar to https://en.wikipedia.org/wiki/Exponential_backoff
See #28