-
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
From pool to pooled #3533
From pool to pooled #3533
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oscar-besga-panel Please add some description to why we should consider this PR.
|
||
@Override | ||
public Connection getConnection() { | ||
return JedisPool.this.getResource().getConnection(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're loosing the reference of the Jedis object; so you can't call close()
on it and so it can't be returned to the pool.
The pool will be exhausted in a multi-threaded environment too quickly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I checked with a test.
I'm trying to fix around, but it seems impossible.
I'll try but if I don't find a way, I will close and discard this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, after reviewing the code and trying to make it work in local, I see there's no use (for now)
I wanted to to this because my library uses JedisPool and anyone using JedisPooled in a project could have problems integrating it; so for a future release migth be a good idea.
But now better close this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the help, @sazzad16
No description provided.