-
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
ConnectionPool and BrokenConnection #437
Comments
jedis can not do that, i think. Because jedis instance can not control the pool, you must use as follows or encapsulate jedis yourself for easier using.
|
giridharkannan
added a commit
to giridharkannan/jedis
that referenced
this issue
Jul 22, 2013
giridharkannan
added a commit
to giridharkannan/jedis
that referenced
this issue
Jul 22, 2013
Resource cleanup has been unified in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As of present implementation if there has occurred an IOException it will be wrapped over JedisConnectionException (RuntimeException). As jedis users, When we use ConnectionPool we just get and release connection in a try finally block, we forget the catch block.
Here's an example:
If closing and returning a broken connection when IOEception occurs had been handled by jedis it would be much easier. As at present we are using already closed connection from the pool and writing to it, which result in a inconsistent state.
The text was updated successfully, but these errors were encountered: