Commit 7bb606a
authored
Cap retry seconds after applying jitter in case jitter brought it over limit (#1023)
Response to #1022: in the default retry policy, cap retry seconds to
`maxDurationSeconds` after applying jitter just in case the application
of jitter brought it over limit.
This should never realistically happen due to the way exponentials work.
If attempt N would bring retry seconds over `maxDurationSeconds`, then
attempt N-1 will likely be nowhere near `maxDurationSeconds` and a 10%
jitter won't be able to bring it over, but still, capping it really
doesn't hurt, so just do it as an additional shore up.
Fixes #1022.1 parent 9f16f8f commit 7bb606a
1 file changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
| |||
89 | 87 | | |
90 | 88 | | |
91 | 89 | | |
92 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
0 commit comments