You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We had a successful Redis failover but the application didn't manage to handle it properly. Current setup is: 9 Sentinels, 1 Master, 3 Slaves.
First we had dozens of Timeout exceptions, that's ok:
io.lettuce.core.RedisCommandTimeoutException: Command timed out
Later on we get couple of these, which I don't think is ok:
java.lang.NullPointerException: null
at io.lettuce.core.masterslave.MasterSlaveTopologyRefresh.getNodeSpecificViews(MasterSlaveTopologyRefresh.java:111)
at io.lettuce.core.masterslave.MasterSlaveTopologyRefresh.getNodes(MasterSlaveTopologyRefresh.java:77)
at io.lettuce.core.masterslave.MasterSlave.lambda$connectSentinel$0(MasterSlave.java:174)
at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891)
at io.lettuce.core.masterslave.SentinelTopologyRefresh.lambda$null$2(SentinelTopologyRefresh.java:149)
at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:125)
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
After that we end up with infinite:
io.lettuce.core.RedisCommandExecutionException: READONLY You can't write against a read only replica.
Input Code
privateval redisUri:RedisURI by lazy {
val redisUriBuilder =RedisURI.builder()
sentinels
.split(",")
.forEach {
val (host, port) = it.split(":")
redisUriBuilder
.withSentinel(host, port.toInt())
.withSentinelMasterId(master)
.withDatabase(2)
.withTimeout(Duration.ofMillis(defaultTimeoutMillis))
}
redisUriBuilder.build()
}
privateval connection:StatefulRedisMasterSlaveConnection<String, String> by lazy {
val connection =MasterSlave
.connect(client, Utf8StringCodec(), redisUri)
connection.readFrom =ReadFrom.MASTER
connection
}
privateval client:RedisClient=RedisClient.create()
Expected behavior/code
The successful failover must not cause the application stop functioning.
Environment
Lettuce version(s): 5.0.1.RELEASE
Redis version: 5.0.3
The text was updated successfully, but these errors were encountered:
Bug Report
Current Behavior
We had a successful Redis failover but the application didn't manage to handle it properly. Current setup is: 9 Sentinels, 1 Master, 3 Slaves.
First we had dozens of Timeout exceptions, that's ok:
Later on we get couple of these, which I don't think is ok:
After that we end up with infinite:
Input Code
Expected behavior/code
The successful failover must not cause the application stop functioning.
Environment
The text was updated successfully, but these errors were encountered: