go-redis
go-redis copied to clipboard
ClusterClient.scan() method randomly pick nodes
We have a ElasticCache Redis cluster with cluster mode enabled. It has two shards. When we call
ClusterClient.Scan(0, "{partition}*", ....), it randomly picks a node to scan instead of finding the right shard. Is it expect behavior? What's the best practice?
Thanks,
same problem
https://github.com/go-redis/redis/issues/804
Therefore, when I want to use SCAN to scan all keys in cluster mode, do I always need to scan each node separately?