Commit 782b7d4
committed
🐛 Priorityqueue: Yet another queue_depth metric fix
Inside the priorityqueues `spin` we call the metrics `add` if an item
becomes ready so that the `queue_depth` metric gets incremented. To
avoid doing this multiple times for the same item, we track the key in a
map and remove it there when we hand the item out.
If an item gets added without `RequeueAfter` that is already on the
queue but with a `RequeueAfter` we also call the metrics `add` - But if
we already did that in `spin` we will count the item twice.1 parent b2dbf6e commit 782b7d4
File tree
3 files changed
+21
-3
lines changed- pkg/controller/priorityqueue
3 files changed
+21
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
91 | | - | |
92 | | - | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
399 | 417 | | |
400 | 418 | | |
401 | 419 | | |
| |||
0 commit comments