Unverified Commit ad7a6275 authored by Binbin's avatar Binbin Committed by GitHub
Browse files

Fix node-id type in cluster-setslot (#10348)

* The type of node-id should be string, not integer.
* Also improve the CLUSTER SETSLOT help message.
parent a6fd2375
......@@ -5026,7 +5026,7 @@ void clusterCommand(client *c) {
" Reset current node (default: soft).",
"SET-CONFIG-EPOCH <epoch>",
" Set config epoch of current node.",
"SETSLOT <slot> (IMPORTING|MIGRATING|STABLE|NODE <node-id>)",
"SETSLOT <slot> (IMPORTING <node-id>|MIGRATING <node-id>|STABLE|NODE <node-id>)",
" Set slot state.",
"REPLICAS <node-id>",
" Return <node-id> replicas.",
......
......@@ -588,9 +588,9 @@ NULL
/* CLUSTER SETSLOT subcommand argument table */
struct redisCommandArg CLUSTER_SETSLOT_subcommand_Subargs[] = {
{"node-id",ARG_TYPE_INTEGER,-1,"IMPORTING",NULL,NULL,CMD_ARG_NONE},
{"node-id",ARG_TYPE_INTEGER,-1,"MIGRATING",NULL,NULL,CMD_ARG_NONE},
{"node-id",ARG_TYPE_INTEGER,-1,"NODE",NULL,NULL,CMD_ARG_NONE},
{"node-id",ARG_TYPE_STRING,-1,"IMPORTING",NULL,NULL,CMD_ARG_NONE},
{"node-id",ARG_TYPE_STRING,-1,"MIGRATING",NULL,NULL,CMD_ARG_NONE},
{"node-id",ARG_TYPE_STRING,-1,"NODE",NULL,NULL,CMD_ARG_NONE},
{"stable",ARG_TYPE_PURE_TOKEN,-1,"STABLE",NULL,NULL,CMD_ARG_NONE},
{0}
};
......
......@@ -26,17 +26,17 @@
"arguments": [
{
"name": "node-id",
"type": "integer",
"type": "string",
"token": "IMPORTING"
},
{
"name": "node-id",
"type": "integer",
"type": "string",
"token": "MIGRATING"
},
{
"name": "node-id",
"type": "integer",
"type": "string",
"token": "NODE"
},
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment