🐛 Priorityqueue: Don't block on Get when queue is shutdown#3243
🐛 Priorityqueue: Don't block on Get when queue is shutdown#3243k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
Conversation
|
Hi @dongjiang1989. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
36826fd to
3ac1786
Compare
|
/ok-to-test |
| w.notifyItemOrWaiterAdded() | ||
|
|
||
| // ref: https://github.com/kubernetes-sigs/controller-runtime/issues/3239 | ||
| if w.shutdown.Load() == true { |
There was a problem hiding this comment.
No need to compare booleans:
| if w.shutdown.Load() == true { | |
| if w.shutdown.Load() { |
There was a problem hiding this comment.
Thanks @alvaroaleman
Fixed
Please re-check it
Signed-off-by: dongjiang <[email protected]>
ca470ca to
342e14d
Compare
|
/test pull-controller-runtime-test |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, dongjiang1989 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
LGTM label has been added. DetailsGit tree hash: 814d59ddf9c39680dfc31eac2d99f146aaf31d6f |
|
/cherrypick release-v0.21 |
|
@alvaroaleman: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@alvaroaleman: cannot checkout DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/cherrypick release-0.21 |
|
@alvaroaleman: new pull request created: #3245 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
|
||
| w.notifyItemOrWaiterAdded() | ||
|
|
||
| // ref: https://github.com/kubernetes-sigs/controller-runtime/issues/3239 |
There was a problem hiding this comment.
@alvaroaleman Shouldn't we do this at the beginning of the func?
| q.Add("baz") | ||
| // shut down | ||
| q.ShutDown() | ||
| q.AddWithOpts(AddOpts{After: time.Second}, "foo") |
There was a problem hiding this comment.
Looks like Add still adds the item to the shutdown queue. Is this the expected behavior?
There was a problem hiding this comment.
We can't really keep anyone from calling Add as it has no return but we can stop acting on it: #3250
There was a problem hiding this comment.
Yeah that's what I was thinking
Close #3239
Fix priority queue
GetWithPriorityblocking when the priority queue is shut down