Thanks for wanting to report an issue you've found in redis-py. Please delete this text and fill in the template below.
It is of course not always possible to reduce your code to a small test case, but it's highly appreciated to have as much data as possible. Thank you!
Version: 5.0.4
Platform: Python 3.9 on Macbook Pro running Sonoma 14.5 (23F79) (applies to other platforms as well)
Description: Sharded subscribe is not honoring the read_from_replicas flag for the class RedisCluster. In particular, it's calling:
node = self.cluster.get_node_from_key(s_channel)
which has the following signature:
def get_node_from_key(self, key, replica=False):
"""
Get the node that holds the key's slot.
If replica set to True but the slot doesn't have any replicas, None is
returned.
"""
As such, only primary replicas are used for sharded subscribe. It'd be great if ssubscribe behaves in the same way as subscribe to be consistent with the definition of the read_from_replicas flag. Thanks!
Thanks for wanting to report an issue you've found in redis-py. Please delete this text and fill in the template below.
It is of course not always possible to reduce your code to a small test case, but it's highly appreciated to have as much data as possible. Thank you!
Version: 5.0.4
Platform: Python 3.9 on Macbook Pro running Sonoma 14.5 (23F79) (applies to other platforms as well)
Description: Sharded subscribe is not honoring the
read_from_replicasflag for theclass RedisCluster. In particular, it's calling:which has the following signature:
As such, only primary replicas are used for sharded subscribe. It'd be great if
ssubscribebehaves in the same way assubscribeto be consistent with the definition of theread_from_replicasflag. Thanks!