I am trying to get multiple values from Redis using Python .
- Using method redisClient.keys("UniqueID*") method to get list of keys that match pattern such as "UniqueID10", "UniqueID11", "UniqueID13"
- while passing the list of keys to method redisClient.mget([list of keys]) , i am getting the error
mget - all keys must map to the same key slot
Below is the code snippet (Python Library)
import redis
rc = redis.RedisCluster(host,port)
all_keys_list = rc.get_client().keys("UniqueID*")
all_values = rc.get_client().mget(all_keys_list )
Error: mget - all keys must map to the same key slot
- Can this be solved from python using any other method or concurrency.
- Do I have to use slot hashing while putting keys and is it possible that all same keys entry do not land in same slot due to memory constraint of the slot and I will get this issue again.