-
Notifications
You must be signed in to change notification settings - Fork 992
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
Deprecate StatefulConnection.reset() #907
Comments
This behavior is expected. Calling What is your use case to call |
I am using Lettuce with fairly small max queue size of 20 commands. I am facing an issue that if the command queue is full when Redis is restarted, the client is somehow not reconnected successfully because all commands are rejected because of the full queue. Seems like the queue is not flushed or something. Occasionally resetting the connection seemed to help, but it lead to the problem I reported. |
Is it possible that after one such invalid |
In our application no where we are invoking conn.reset(). But still we are seeing the same behavior, with HGET command returns different values. Apart from conn.reset(), is there any other scenarios which can start behaving like this? We are using AWS Elastic Cache Redis Cluster 3.2.6 RedisClusterCommands(RedisAdvancedClusterCommands<String, Object>) defined as class variable and created through constructor. All the HMSET and HGET calls from application made through class variable redisClusterCommands. Does lettuce client make conn.reset() for anything? If yes, what are all situations it can do so. Lettuce version we are using, |
@anagamca care to file a new issue along logs and a reproducer? Regarding |
@semberal can you provide a reproducer? We should fix the queue size issue instead of trying to recover the client state in the application. This is probably a good time to deprecate |
Deprecating reset() method as we no longer require this functionality. Reset was introduced with Lettuce 3.1 where we did not have SSL support and external SSL tunneling was the only possibility to use SSL connections. External tunneling with strunnel could break and the only way to recover was resetting the protocol state.
|
Bug Report
Current Behavior
When
StatefulRedisConnection
is reset, results of subsequent commands are non-deterministic. Results of completely different commands are returned. I extracted minimal example, where there are 2 redis keys:a
->a
andb
->b
. Two parallel threads are reading these two keys in a loop. Then, at some point I resetStatefulRedisConnection
. After that, the result of client.get("a") can be "b" and vice versa.Input Code
Minimal example:
Environment
The text was updated successfully, but these errors were encountered: