-
Notifications
You must be signed in to change notification settings - Fork 550
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
Added a timeout for checking or creating async-cluster connections #866
base: main
Are you sure you want to change the base?
Conversation
…prevent hanging on broken connections
516aede
to
a411512
Compare
Hi, thanks for the submission. Does it make more sense to implement this as a configurable feature on the underlying connection instead? This is something that I think has been badly needed on the async side but has thus far not been implemented. |
Discussed this with @barshaul already - it's very similar to #834 |
Exactly, response timeouts is what I was attempting to refer to. We have this on the sync connection, would be wonderful if we could do the same for async. |
Adding a response timeout to |
I'm not clear on the overhead of implementing timeouts, but I disagree that it's easy for users to wrap requests in timeouts... Obviously it's not hard to do so, but it's not obvious to users whether it's safe to do so without corrupting the connection. This is supported on sync connections, and in my view it seems reasonable to do the same for async if we can do so with a sane implementation. |
proposed timeouts for async connections: |
When PINGing or re-connecting to a node that has issues or has been shut down, the request can get hanged and stuck, preventing the client from getting the new cluster topology. In order to prevent hanging on broken connections
a timeout of 250 milliseconds was added to get_or_create_conn().