[QUESTION] AsyncRedisCluster object not switching to alternative node
mike1821 opened this issue · 1 comments
Hello,
I am using an async cluster object to establish a connection towards one of the master nodes (0).
sw::redis::ConnectionOptions opts;
sw::redis::AsyncRedisCluster client;
opts.host = "db-cluster-0-ip";
opts.port = 6379;
client = sw::redis::AsyncRedisCluster(opts);
When I try to execute an HMSET request the cluster responds with a MOVED error and an alternative node is reported. By capturing the traffic, it seems the library does not switch over to the new node , instead it posts another CLUSTER SLOTS command and keeps sending the original command to the same node (0).
At some point I even get a "too many moved error" and the command fails.
Do I need to specify any specific options to have this setup operate correctly? Based on the README, I just set the cluster IP and Port without any other specific options.
Environment:
- OS: Rocky Linux
- Compiler: g++ 8.5.0
- hiredis version: v1.0.0, master]
- redis-plus-plus version: 1.3.10, master
Sorry, but I cannot reproduce your problem.
too many moved error
This means your request has been moved more than once. Normally this means your cluster is unstable, and some slots are moving from one node to another, and some state has not been set yet.
keeps sending endlessly cluster info
redis-plus-plus never sends cluster info
command automatically, instead, it only send cluster slots
. You might need to check your cluster settings.
Regards