-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Docs] Add clarification about property precedence #1918
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
Changes from 1 commit
f7b6a6c
a79988d
106df37
9345f5f
a1515c8
4607b93
aef2b88
eb4b475
d28bd3e
027c732
1e71491
7ad36e0
4614dcb
dfbfb3d
62665fa
8cf291a
e39d09c
622cecc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -114,11 +114,11 @@ If the `ShouldHandle` predicate returns `true` and the next attempt number is no | |||||
|
||||||
There are many properties that may contribute to this calculation: | ||||||
|
||||||
- `Delay` | ||||||
- `DelayGenerator` | ||||||
- `MaxDelay` | ||||||
- `UseJitter` | ||||||
- `BackoffType` | ||||||
- `BackoffType`: It specifies which calculation algorithm should run. | ||||||
- `Delay`: If only this one is specified then it will be used as is. If others are defined as well then this will be used as a _base delay_. | ||||||
- `DelayGenerator`: If specified then it will overwrite other properties based calculation. **Except** if it returns a negative `TimeSpan` where the other properties based calculation is used. | ||||||
- `MaxDelay`: If specified then it caps the delay if the calculated one is greater than this value. **Except** if `DelayGenerator` is used where no capping is applied. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Just wondering, shall we apply the capping to values produced by generator too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would say yes. That was my intuition before I checked the implementation. But let's deal with that in a separate PR if you don't mind. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My intuition says yes too, the less special cases, the better. The only downside is that sometimes the Thoughts @martincostello There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would agree we should apply it - There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is a concision decision by the strategy configurator that (s)he sets the |
||||||
- `UseJitter`: If enabled then it adds a random value between between -25% of `Delay` and +25% of `Delay`. **Except** if `BackoffType` is set to `Exponential` where jitter is always used. | ||||||
peter-csala marked this conversation as resolved.
Show resolved
Hide resolved
peter-csala marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
> [!IMPORTANT] | ||||||
> The summarized description below is an implementation detail. It may change in the future without notice. | ||||||
|
@@ -137,7 +137,8 @@ Step 1: Calculating the base delay: | |||||
|
||||||
Step 2: Capping the delay if needed: | ||||||
|
||||||
- If the previously calculated delay is greater than `MaxDelay` then `MaxDelay` will be used. | ||||||
- If `MaxDelay` is not set then the previously calculated delay will be used. | ||||||
- If `MaxDelay` is set and the previously calculated delay is greater than `MaxDelay` then `MaxDelay` will be used. | ||||||
|
||||||
Step 3: Using the generator if supplied | ||||||
|
||||||
|
Uh oh!
There was an error while loading. Please reload this page.