File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -488,14 +488,17 @@ func (m *Manager) ManageVolume(volumeID string) error {
488
488
489
489
if meta .NextIssuanceTime == nil || m .clock .Now ().After (* meta .NextIssuanceTime ) {
490
490
wait .ExponentialBackoffWithContext (ctx , wait.Backoff {
491
+ // 2s is the 'base' amount of time for the backoff
491
492
Duration : time .Second * 2 ,
493
+ // We multiple the 'duration' by 2.0 if the attempt fails/errors
492
494
Factor : 2.0 ,
495
+ // Add a jitter of +/- 1s (0.5 of the 'duration')
493
496
Jitter : 0.5 ,
494
- // Set this to the maximum int value to avoid resetting the exponential backoff
495
- // timer early.
496
- // This will mean that once the back-off hits 1 minute, we will constantly retry once
497
- // per minute rather than resetting back to `Duration` (2s).
497
+ // 'Steps' controls what the maximum number of backoff attempts is before we
498
+ // reset back to the 'base duration'. Set this to the MaxInt32, as we never want to
499
+ // reset this unless we get a successful attempt.
498
500
Steps : math .MaxInt32 ,
501
+ // The maximum time between calls will be 1 minute
499
502
Cap : time .Minute ,
500
503
}, func () (bool , error ) {
501
504
log .Info ("Triggering new issuance" )
You can’t perform that action at this time.
0 commit comments