go-redis icon indicating copy to clipboard operation
go-redis copied to clipboard

ClusterClient.scan() method randomly pick nodes

Open manlinl opened this issue 4 years ago • 4 comments

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,

manlinl avatar Mar 26 '20 16:03 manlinl

same problem

chengjianxi avatar Dec 24 '21 10:12 chengjianxi

https://github.com/go-redis/redis/issues/804

maguowei avatar Feb 23 '22 11:02 maguowei

Therefore, when I want to use SCAN to scan all keys in cluster mode, do I always need to scan each node separately?

osWYLa avatar Jun 15 '23 06:06 osWYLa