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

Invalidate pooled Jedis objects on JedisConnectionException in RedisService #13

Merged
merged 2 commits into from
Jul 7, 2012
Merged

Conversation

david-seiler
Copy link

If a Jedis object throws a JedisConnectionException, it becomes invalid, and further attempts to use it may fail or behave strangely. This patch intercepts those exceptions in RedisService.withRedis(), so that invalid Jedis objects aren't returned to the pool to be reused. That solves the problem for RedisService and all its users, but I haven't read the whole plugin and similar issues may arise if Jedis objects are used directly elsewhere.

@tednaleid
Copy link
Contributor

+1 looks great! Thanks for the pull request, I think I've been bitten by this issue in the past.

tednaleid added a commit that referenced this pull request Jul 7, 2012
Invalidate pooled Jedis objects on JedisConnectionException in RedisService
@tednaleid tednaleid merged commit 09bf68a into grails:master Jul 7, 2012
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.

None yet

2 participants