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

Introduce RetryBackoffType.ExponentialWithJitter #1176

Merged
merged 2 commits into from
May 14, 2023

Conversation

martintmk
Copy link
Contributor

@martintmk martintmk commented May 3, 2023

The issue or feature being addressed

Closes #1108

Details on the issue fix or feature implementation

Adding RetryBackoffType.ExponentialWithJitter retry delay type and making it a default one.

Adopted from:
https://github.com/Polly-Contrib/Polly.Contrib.WaitAndRetry/blob/master/src/Polly.Contrib.WaitAndRetry/Backoff.DecorrelatedJitterV2.cs

Confirm the following

  • I started this PR by branching from the head of the default branch
  • I have targeted the PR to merge into the default branch
  • I have included unit tests for the issue/feature
  • I have successfully run a local build

@martintmk martintmk self-assigned this May 3, 2023
@martintmk martintmk added the v8 Issues related to the new version 8 of the Polly library. label May 3, 2023
@martintmk martintmk added this to the v8.0.0 milestone May 3, 2023
@codecov-commenter
Copy link

codecov-commenter commented May 3, 2023

Codecov Report

Merging #1176 (594c914) into main (24da172) will increase coverage by 0.03%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main    #1176      +/-   ##
==========================================
+ Coverage   83.38%   83.42%   +0.03%     
==========================================
  Files         272      273       +1     
  Lines        6315     6328      +13     
  Branches     1027     1028       +1     
==========================================
+ Hits         5266     5279      +13     
  Misses        844      844              
  Partials      205      205              
Flag Coverage Δ
linux 83.42% <100.00%> (+0.03%) ⬆️
macos 83.42% <100.00%> (+0.03%) ⬆️
windows 83.42% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Polly.Core/Retry/RetryConstants.cs 100.00% <ø> (ø)
...c/Polly.Core/Retry/RetryStrategyOptions.TResult.cs 100.00% <ø> (ø)
src/Polly.Core/Retry/RetryStrategyOptions.cs 100.00% <ø> (ø)
src/Polly.Core/Retry/RetryHelper.cs 100.00% <100.00%> (ø)
src/Polly.Core/Retry/RetryResilienceStrategy.cs 100.00% <100.00%> (ø)
.../Retry/RetryResilienceStrategyBuilderExtensions.cs 100.00% <100.00%> (ø)
src/Polly.Core/Utils/RandomUtil.cs 100.00% <100.00%> (ø)

@martintmk martintmk marked this pull request as ready for review May 3, 2023 11:43
@martintmk martintmk requested a review from martincostello May 4, 2023 11:08
src/Polly.Core.Tests/Utils/RandomUtilTests.cs Show resolved Hide resolved
src/Polly.Core/Retry/RetryHelper.cs Outdated Show resolved Hide resolved
src/Polly.Core/Retry/RetryHelper.cs Outdated Show resolved Hide resolved
src/Polly.Core/Utils/RandomUtil.cs Show resolved Hide resolved
@martintmk martintmk force-pushed the mtomka/exponentialwithjitter branch from de54a62 to 4c62e14 Compare May 14, 2023 13:07
@martintmk martintmk merged commit cb017af into main May 14, 2023
@martintmk martintmk deleted the mtomka/exponentialwithjitter branch May 14, 2023 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 Issues related to the new version 8 of the Polly library.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Introduce RetryBackoffType.ExponentialWithJitter retry delay
3 participants