Closed
Description
Describe the bug
The method xgroup_create of the redis cluster client fails when running on redis version 7.0.0.
Using the version 4.2.2 of the python redis client, the python version is 3.10.4, OS is Ubuntu 22.04.
To reproduce
from redis import RedisCluster
from redis.cluster import ClusterNode
client = RedisCluster(
startup_nodes=[
ClusterNode("127.0.0.1", 7001),
ClusterNode("127.0.0.1", 7002),
ClusterNode("127.0.0.1", 7003),
ClusterNode("127.0.0.1", 7004),
ClusterNode("127.0.0.1", 7005),
]
)
client.xgroup_create("test", "test")
Expected behavior
The method should work just like it did when using the same client version with redis version 6.2.6.
Additional information
This is the output of the python stack trace.
File ~/.cache/pypoetry/virtualenvs/poetry_venv-py3.10/lib/python3.10/site-packages/redis/cluster.py:976, in RedisCluster.determine_slot(self, *args)File ~/.cache/pypoetry/virtualenvs/ubi.events-engine-94LnMkf1-py3.10/lib/python3.10/site-packages/redis/cluster.py:976, in RedisCluster.determine_slot(self, *args)
974 if command in ("FCALL", "FCALL_RO"):
975 return random.randrange(0, REDIS_CLUSTER_HASH_SLOTS)
--> 976 raise RedisClusterException(
977 "No way to dispatch this command to Redis Cluster. "
978 "Missing key.\nYou can execute the command by specifying "
979 f"target nodes.\nCommand: {args}"
980 )
982 # single key command
983 if len(keys) == 1:
RedisClusterException: No way to dispatch this command to Redis Cluster. Missing key.
You can execute the command by specifying target nodes.
Command: ('XGROUP CREATE', 'test', 'test', '$')
Metadata
Metadata
Assignees
Labels
No labels