-
Notifications
You must be signed in to change notification settings - Fork 121
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
Cache can't be garbage collected #3
Comments
Are you ok with the cache being unusable once Consider: bfa769c |
Edited: there is a big problem with "deletables" channel: goroutines waiting to pass values are blocked.. |
On close, drain the deletables channel (unblocking an waiting goroutines) and close deletables. Like Gets and Sets against a now-closed promotables, this means any subsequent to Deletes from deletables will panic. I'm still not sure that this is ccache's responsibility. If a client closes a DB connection, we'd expect subsequent operations against the now-closed connection to fail. My main problems with defer'ing a recover are: 1 - the performance overhead on every single get / set / delete 2 - not communicating with the caller that the requested operatin is no longer valid.
Goroutine (associated with cache worker) prevent cache from being collected.
In my opinion there should be a way to stop it.
Alternatively, this fact should be documented.
Keep up the good work,
Enrico
The text was updated successfully, but these errors were encountered: