lettuce
lettuce copied to clipboard
SMISMEMBER is not marked a readonly command
Bug Report
Current Behavior
When issuing a SMISMEMBER
command, the master node is always picked when ReadFrom.REPLICA
is set.
Input Code
val connection = MasterReplica.connect(redisClient, StringCodec.UTF8, uris) // master and replica uris
connection.setReadFrom(ReadFrom.REPLICA)
val async = connection.async()
connection.smismember("key", "value1", "value2")
Expected behavior/code
One of the relica nodes should get the command.
Environment
- Lettuce version(s): 6.2.0.RELEASE
- Redis version: 6.2.6
Possible Solution
io.lettuce.core.masterreplica.ReadOnlyCommands
should contain SMISMEMBER
and
io.lettuce.core.cluster.ReadOnlyCommands
should contain SMISMEMBER