RedisClusterClient is not retrying after connection failures #1893
Replies: 2 comments 4 replies
-
Exceptions that happen when sending a command or reading the response bubble as exceptions to indicate that a failure has happened and that requires special attention. On the sending side, it could be that the command has been sent but we don't know. Errors on the reading side typically indicate that a command has been processed on the server but for some reason the client wasn't able to fully consume the response. Silently retrying such commands is prone to cause duplicate actions on the server. |
Beta Was this translation helpful? Give feedback.
-
BTW -Even though I'm questioning some of the behavior I really appreciate the level of detail in the lettuce documentation. It's really helpful that the docs address this situation. I was trying to look up what jedis does and there is just nothing. Thanks for all your effort! |
Beta Was this translation helpful? Give feedback.
-
This is somewhat similar to #1789, however it is not related to a handshake failure.
I have a test that is using a RedisClusterClient that is doing
set
operations to redis in cluster mode. At the same time the test is killing and restarting redis servers. What I see is that sometimes the I get this failure from lettuce (I think due to a server crashing):I was expecting lettuce to retry the operation until it succeeds, discovering the new location of the slots and sending the command there if necessary.
I created a reproducible test case in the lettuce test suite which is available here. This particular test is not actually killing servers but it is simulating a failure by calling CLIENT KILL on the server to drop the client connection. Here's an example failure from the test
Should I turn this into a bug report, or am I doing or expecting something wrong from lettuce?
Beta Was this translation helpful? Give feedback.
All reactions