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
cacher: don't accept requests if stopped #108414
Conversation
/assign @wojtek-t @sttts @p0lyn0mial @tkashem |
I set the check before the ready() condition, but I don't know if it should short circuit immediately , not familiar with this code 🤷 |
this actually reduces the number of goroutines leaked by
from ~200 to 60 grep expected test.log |
/triage accepted |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aojea, wojtek-t The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
e5e713a
to
0b06078
Compare
Still LGTM modulo the discussion about error code. |
/hold cancel |
The cacher blocks requests until it is ready, however, the ready variable doesn't differentiate if the cacher was stopped. The cacher is using a condition variable based on sync.Cond to handle the readiness, however, this was not taking into account if it was not ready because it was waiting to be ready or it was stopped. Add a new condition to the condition variable to handle the stop condition, and returning an error to signal the goroutines that they should stop waiting and bail out.
Still LGTM - but I guess @liggitt should take another look. |
/lgtm |
…ed watch-cache from indefinitely counting as an inflight request Cherry-pick of upstream Kubernetes PR kubernetes#108414 and kubernetes#116024
The cacher blocks until it is ready to answer request, however, the
ready variable doesn't differentiate if the cacher was stopped.
Before blocking waiting for the cacher to be ready, check if it
was stopped and return an error notifying the client.
/kind bug