sherlock icon indicating copy to clipboard operation
sherlock copied to clipboard

Redis cluster not Compatible

Open yzf opened this issue 6 years ago • 0 comments

When using redis cluster, keys in lua script should be in the same slot. In current implementation, u use KEYS for lock_name, owner, expire. In most cases, they are not in the same slot, so it will raise rediscluster.exceptions.RedisClusterException: EVALSHA - all keys must map to the same key slot if use redis-py-cluster as backend.

I think it's more reasonable to use ARGV for owner and expire as they are actually not KEYS. And with ARGV, it will be compatible to redis cluster.

yzf avatar Oct 01 '18 00:10 yzf