-
Notifications
You must be signed in to change notification settings - Fork 562
Bug 1834136: fix(queues): use a single gc queue #1513
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 all commits
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 |
---|---|---|
|
@@ -39,6 +39,11 @@ func (r *ResourceQueueSet) RequeueEvent(namespace string, resourceEvent kubestat | |
r.mutex.RLock() | ||
defer r.mutex.RUnlock() | ||
|
||
if queue, ok := r.queueSet[metav1.NamespaceAll]; len(r.queueSet) == 1 && ok { | ||
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. Why is this necessary? if 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. because we also want all of the requeues that specifically mention a namespace to go to the all-namespace queue as well. |
||
queue.AddRateLimited(resourceEvent) | ||
return nil | ||
} | ||
|
||
if queue, ok := r.queueSet[namespace]; ok { | ||
queue.AddRateLimited(resourceEvent) | ||
return nil | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm not mistaken, the value of
webhook
was changing underneath the pointer since it's a free variable in the loop's body.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch!