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

renewClusterSlots throw JedisException #3153

Closed
jgaoIXL opened this issue Sep 28, 2022 · 1 comment · Fixed by #3166
Closed

renewClusterSlots throw JedisException #3153

jgaoIXL opened this issue Sep 28, 2022 · 1 comment · Fixed by #3166
Labels
Milestone

Comments

@jgaoIXL
Copy link
Contributor

jgaoIXL commented Sep 28, 2022

Expected behavior

when calling ClusterConnectionProvider.renewSlotCache(). it should succeed whether there are dead nodes in the cluster or not.

Actual behavior

When I run the jedis client against a auto scaling redis cluster where the nodes are constantly going in and out, ClusterConnectionProvider.renewSlotCache() throw JedisException, the stack traces are like below. So seems to me that there are dead nodes in the cluster that cause the getResource() to throw JedisException, however, shouldn't that exception to be caught?

redis.clients.jedis.exceptions.JedisException: Could not get a resource from the pool at redis.clients.jedis.util.Pool.getResource(Pool.java:38) at redis.clients.jedis.ConnectionPool.getResource(ConnectionPool.java:28) at redis.clients.jedis.JedisClusterInfoCache.renewClusterSlots(JedisClusterInfoCache.java:123) at redis.clients.jedis.providers.ClusterConnectionProvider.renewSlotCache(ClusterConnectionProvider.java:58)

Steps to reproduce:

Recreating this will be tough, basically what I was doing is run the Jedis against an auto scaling redis cluster. And this exception happen after a while. Anyway, shouldn't JedisException be caught inside renewSlotCache()? Like having some dead nodes should be tolerated.

Redis / Jedis Configuration

Jedis version:

4.2.3

Redis version:

6.2.2

Java version:

17

@sazzad16
Copy link
Contributor

@jgaoIXL Thank you for reporting this. And sorry to miss it before releasing 4.3.0.

@sazzad16 sazzad16 added this to the 4.3.1 milestone Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants