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
I am experiencing an issue with getting the number of keys in the cache. I am setting the keys with
connection.async.set(key, value). I also have a method to get the number of keys: connection.sync.keys("*").size().
The issue is when I run the unit tests, after I insert one key value pair and use the size method, it returns 2. When I print the keys themselves I get something like this list("123", "123"). I do have replica enabled with redis cluster so I setup the connection to only read from master: connection.setReadFrom(ReadFrom.MASTER) however, the issue still persists. When I turn off replica mode in redis, the issue goes away.
I am not able to replicate this locally, can you give some more details on the deployment you are using?
Could you also verify if the same results are returned when using another client, for ex. redis-cli?
If the same results are returned from both clients, then the issue is in the setup / server.
Bug Report
Current Behavior
I am experiencing an issue with getting the number of keys in the cache. I am setting the keys with
connection.async.set(key, value). I also have a method to get the number of keys: connection.sync.keys("*").size().
The issue is when I run the unit tests, after I insert one key value pair and use the size method, it returns 2. When I print the keys themselves I get something like this list("123", "123"). I do have replica enabled with redis cluster so I setup the connection to only read from master: connection.setReadFrom(ReadFrom.MASTER) however, the issue still persists. When I turn off replica mode in redis, the issue goes away.
I have lettuce setup to use connection pooling for my application. I based the setup off of AWS ElastiCache recommended config https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/BestPractices.Clients-lettuce.html
Input Code
Input Code
Expected behavior/code
When getting the keys from the cache using ReadFrom.MASTER, it should not return the replica keys.
Environment
Possible Solution
Additional context
The text was updated successfully, but these errors were encountered: