hedis icon indicating copy to clipboard operation
hedis copied to clipboard

add CLUSTER INFO command and use it for new checkedConnectCluster

Open stefanwire opened this issue 3 years ago • 3 comments

Redis nodes in cluster mode can be pinged, but a successful pong from one cluster node would not determine whether the cluster and thus all its nodes are up and running. The cluster is up only if the CLUSTER INFO command reports cluster_state:ok.

This PR adds the CLUSTER INFO command and the checkedConnectCluster helper function for safely connecting to Redis clusters only when the cluster is up.

stefanwire avatar Jul 08 '22 08:07 stefanwire

Related to https://github.com/informatikr/hedis/issues/183.

stefanwire avatar Jul 08 '22 13:07 stefanwire

@jbrechtel, what do you think?

stefanwire avatar Jul 13 '22 13:07 stefanwire

Hello, @stefanwire! Thanks for your work and sorry for a late reply I've used your branch merged with latest master and tried to run cluster tests there. hedis-test-cluster just hangs for me...

If you are still interested in this issue and Redis cluster support can you take a look into that. Maybe I'm just running it in the wrong way.

I've run docker run -e "IP=0.0.0.0" -p 8000-8010:7000-7010 grokzen/redis-cluster:6.2.11, as 7000 is used my Control Centre application on MacOS, edited test to use port 8000 and started it.

qnikst avatar May 28 '23 21:05 qnikst