Skip to content
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

Error in the exponential backoff docs? #33

Open
kinetiq opened this issue Sep 8, 2023 · 0 comments
Open

Error in the exponential backoff docs? #33

kinetiq opened this issue Sep 8, 2023 · 0 comments

Comments

@kinetiq
Copy link

kinetiq commented Sep 8, 2023

In the readme here: https://github.com/Polly-Contrib/Polly.Contrib.WaitAndRetry/blob/master/README.md?plain=1

I found this:

var delay = Backoff.ExponentialBackoff(TimeSpan.FromMilliseconds(100), retryCount: 5, factor: 4);

It goes on to say:

The upper for this retry with a growth factor of four is 25,600ms. Care and a calculator should be used when changing the factor.

I eventually built this out in a spreadsheet because care a calculator wasn't working. ;) Shouldn't the sequence be:

1: 100ms
2: 1600ms
3: 8100ms
4: 25600ms
5: 62500ms (TL;DR: 100ms * 5 ^ 4)

...Making the upper 62,500ms? Please let me know if this is calculated differently.

In any event, keep up the great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant