redis / redis-om-python

Object mapping, and more, for Redis and Python
MIT License
1.12k stars 112 forks source link

Redis cluster Migrator not working #408

Open noonenene opened 1 year ago

noonenene commented 1 year ago
from redis.cluster import RedisCluster as Redis
redis_userdb = Redis(host='xxx.yyy.zzz.xx', port=xxxx, password='password)
print(redis_userdb.get_nodes())

I able to write data on all cluster node without any issue but not able to run Migrator().run()

print(Users.get("user1"))
Migrator().run()
ResponseError: Unknown Index name
Traceback (most recent call last):
  File "/home/ubuntu/project/.venv/lib/python3.8/site-packages/redis/cluster.py", line 1074, in _execute_command
    response = redis_node.parse_response(connection, command, **kwargs)
  File "/home/ubuntu/project/.venv/lib/python3.8/site-packages/redis/client.py", line 1254, in parse_response
    response = connection.read_response()
  File "/home/ubuntu/project/.venv/lib/python3.8/site-packages/redis/connection.py", line 839, in read_response
    raise response
redis.exceptions.ResponseError: Unknown Index name
MovedError
Traceback (most recent call last):
  File "/home/ubuntu/project/.venv/lib/python3.8/site-packages/redis/cluster.py", line 1074, in _execute_command
    response = redis_node.parse_response(connection, command, **kwargs)
  File "/home/ubuntu/project/.venv/lib/python3.8/site-packages/redis/client.py", line 1254, in parse_response
    response = connection.read_response()
  File "/home/ubuntu/project/.venv/lib/python3.8/site-packages/redis/connection.py", line 839, in read_response
    raise response
redis.exceptions.MovedError: 13099
msarm commented 1 year ago

In the Version 0.1.0, the below change was made and causing this issue.

image