You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
When using redis cluster,
keys
in lua script should be in the same slot. In current implementation, u useKEYS
forlock_name
,owner
,expire
. In most cases, they are not in the same slot, so it will raiserediscluster.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
forowner
andexpire
as they are actually not KEYS. And withARGV
, it will be compatible to redis cluster.The text was updated successfully, but these errors were encountered: