Skip to content
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

Closed
wants to merge 4 commits into from
Closed

From pool to pooled #3533

wants to merge 4 commits into from

Conversation

oscar-besga-panel
Copy link
Contributor

No description provided.

Copy link
Collaborator

@sazzad16 sazzad16 left a 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();
Copy link
Collaborator

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants