Closed steam0 closed 3 years ago
Thanks for the report. The bug is on our side. Since the introduction of JedisClientConfig
, we erroneously set the database number for the configuration object that is used to specify the Sentinel-specific node configuration. The only workaround would be using Lettuce instead of Jedis since Lettuce doesn't have that bug on its code path to initialize the client.
But is the bug on your side Spring Data Redis
or is it a bug in the client lib Jedis
? If it is on your side, I will just wait until a fix is ready (which I believe won't take months and months?)
It's on our side. The next releases are scheduled for late July (https://calendar.spring.io/).
Hello,
I have previously asked this question directly to the Jedis-team redis/jedis#2567 but I don't really understand what is happening here. There are a few questions that I need to get adressed.
1. Is it supposed to be possible to use Redis sentinels and a specific Redis database (db > 0)?
While trying to connect to Redis using Sentinel and having the database property set to any number greater than 0, the applicaiton crashes. (Spring Boot 2.5.1, Spring Data Redis 2.5.1, Jedis 3.6.0) It seems like the
new Jedis(hap.getHost(), hap.getPort(), sentinelConnectionTimeout, sentinelSoTimeout)
line insideJedisSentinelPool.java
in Jedis 3.6.0 crashes because we are trying to set the database number in redis sentinel rather than in the redis master node. See more in the jedis bug posted above.Example configuration:
2. If we are supposed to use Redis sentinels and a specific database (db > 0), then how do I configure that?
Since configuring the sentinelConfig with a database number breaks the application, where and when should I do it?
Thank you so much in advance.
Demo app is attached below that show the problem. demo-app.zip