mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
Adjust redis-cli --cluster create arity from -2 to -1 (#12892)
When arity is -2, it allows us to input two nodes, but returns: ``` *** ERROR: Invalid configuration for cluster creation. *** Redis Cluster requires at least 3 master nodes. *** This is not possible with 2 nodes and 0 replicas per node. *** At least 3 nodes are required. ``` When we input one node, it return: ``` [ERR] Wrong number of arguments for specified --cluster sub command ``` Strictly speaking -2 should also be rejected, because redis-cli requires at least three nodes. However, the error message was not very friendly, so decided to change it arity -1. This closes #12891.
This commit is contained in:
parent
8527959598
commit
5b1fe925f2
@ -3765,7 +3765,7 @@ typedef struct clusterManagerCommandDef {
|
||||
} clusterManagerCommandDef;
|
||||
|
||||
clusterManagerCommandDef clusterManagerCommands[] = {
|
||||
{"create", clusterManagerCommandCreate, -2, "host1:port1 ... hostN:portN",
|
||||
{"create", clusterManagerCommandCreate, -1, "host1:port1 ... hostN:portN",
|
||||
"replicas <arg>"},
|
||||
{"check", clusterManagerCommandCheck, -1, "<host:port> or <host> <port> - separated by either colon or space",
|
||||
"search-multiple-owners"},
|
||||
|
Loading…
Reference in New Issue
Block a user