-
Notifications
You must be signed in to change notification settings - Fork 58
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
Surface 'server_disconnected' state to API consumers #238
Comments
Hey there, I try to mimic what happens on pylibmc for example. Do you know what it returns? |
Hey @jaysonsantos, thanks for the guidance here! I think pymc is raising ValueErrors - I'm not super familiar with the library, but looking at the C source, it looks like it calls For some additional context - we are using the distributed client. Our use case is using this library + flask-limiter. With flask-limiter, there are multiple get memcache calls that need to succeed (for example, get a rate limit expiration). If one of them errors, it's possible to end up extending rate limiting windows. This is rare, but can happen often depending on the request throughput you are doing. (Sorry if this is super hand-wavey). Anyway, I'll try extending the protocol like you said. If it works out for our flask-limiter case I can open a PR to try to introduce the behavior without breaking the API (maybe make it opt-in or something). |
Would it be possible to surface the cases where there are connectivity errors?
For example with
get
right now, it returnsNone
when there is a connectivity error and there is no way to distinguish if the key is actually missing or if there was a connectivity error.I'd be happy to open a PR that adds this functionality via raising some kind of exceptions. I think to keep API compatibility enabling this would need to be an option when creating a client.
The text was updated successfully, but these errors were encountered: