-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Avoid QUIT for broken connections #2336
Conversation
Hi, @sazzad16, the code look good to me, but i don't think it will solve #2108 #2105 Under current jedis netWork protocol, if a operation timeouted, will set About this issue, i think the only way to avoid close connection is increase |
@yangbodong22011 The object will be returned to the pool as a broken resource. The pool will remove it and never use it again. If necessarily, the pool will create a new resource which will have a new socket. Do you think it will still be a problem? |
This is the current logic, and it is correct. but |
The goal of this PR is not to avoid creating new connections and solve #2105. The goal here is to avoid executing a Redis command (QUIT) with a connection which is already broken while trying to execute some other command. If you are not convinced that this will resolve #2108, we can still keep the issue open and move forward with this PR. |
bb8ecc5
to
ab9ed11
Compare
Co-authored-by: Mina Asham <[email protected]>
Note: Found it hard to write proper test codes. We may need to mock for this purpose.