Skip to content

Commit 16d3d84

Browse files
Merge pull request #425 from wking/maxRetries-docs
pkg/cvo: Fix maxRetries comment (not about machineconfig pools)
2 parents 09c065b + 69b459e commit 16d3d84

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

pkg/autoupdate/autoupdate.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ import (
2727
)
2828

2929
const (
30-
// maxRetries is the number of times a machineconfig pool will be retried before it is dropped out of the queue.
31-
// With the current rate-limiter in use (5ms*2^(maxRetries-1)) the following numbers represent the times
32-
// a machineconfig pool is going to be requeued:
33-
//
34-
// 5ms, 10ms, 20ms, 40ms, 80ms, 160ms, 320ms, 640ms, 1.3s, 2.6s, 5.1s, 10.2s, 20.4s, 41s, 82s
30+
// maxRetries is the number of times a work-item will be retried before it is dropped out of the queue.
3531
maxRetries = 15
3632
)
3733

@@ -141,13 +137,13 @@ func (ctrl *Controller) handleErr(err error, key interface{}) {
141137
}
142138

143139
if ctrl.queue.NumRequeues(key) < maxRetries {
144-
klog.V(2).Infof("Error syncing controller %v: %v", key, err)
140+
klog.V(2).Infof("Error handling %v: %v", key, err)
145141
ctrl.queue.AddRateLimited(key)
146142
return
147143
}
148144

149145
utilruntime.HandleError(err)
150-
klog.V(2).Infof("Dropping controller %q out of the queue: %v", key, err)
146+
klog.V(2).Infof("Dropping %q out of the queue: %v", key, err)
151147
ctrl.queue.Forget(key)
152148
}
153149

pkg/cvo/cvo.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@ import (
5252
)
5353

5454
const (
55-
// maxRetries is the number of times a machineconfig pool will be retried before it is dropped out of the queue.
56-
// With the current rate-limiter in use (5ms*2^(maxRetries-1)) the following numbers represent the times
57-
// a machineconfig pool is going to be requeued:
58-
//
59-
// 5ms, 10ms, 20ms, 40ms, 80ms, 160ms, 320ms, 640ms, 1.3s, 2.6s, 5.1s, 10.2s, 20.4s, 41s, 82s
55+
// maxRetries is the number of times a work-item will be retried before it is dropped out of the queue.
6056
maxRetries = 15
6157
)
6258

@@ -400,14 +396,14 @@ func handleErr(ctx context.Context, queue workqueue.RateLimitingInterface, err e
400396
}
401397

402398
if queue.NumRequeues(key) < maxRetries {
403-
klog.V(2).Infof("Error syncing operator %v: %v", key, err)
399+
klog.V(2).Infof("Error handling %v: %v", key, err)
404400
queue.AddRateLimited(key)
405401
return
406402
}
407403

408404
err = syncFailingStatus(ctx, nil, err)
409405
utilruntime.HandleError(err)
410-
klog.V(2).Infof("Dropping operator %q out of the queue %v: %v", key, queue, err)
406+
klog.V(2).Infof("Dropping %q out of the queue %v: %v", key, queue, err)
411407
queue.Forget(key)
412408
}
413409

0 commit comments

Comments
 (0)