summaryrefslogtreecommitdiff
path: root/src/sentinel.c
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2021-12-08 14:59:02 +0800
committerGitHub <noreply@github.com>2021-12-08 08:59:02 +0200
commita7726cdf517eca16dec37655881ddae2688aaaeb (patch)
tree5dc38f82ca29c9f111dd71b6aa8a643d82f3ae35 /src/sentinel.c
parent08ed44d722a278b9d0aa6a08c760ee1fc5a0f6ed (diff)
downloadredis-a7726cdf517eca16dec37655881ddae2688aaaeb.tar.gz
Fix SENTINEL subcommands's arity (#9909)
For `SENTINEL SET`, we can use in these ways: 1. SENTINEL SET mymaster quorum 3 2. SENTINEL SET mymaster quorum 5 parallel-syncs 1 For `SENTINEL SIMULATE-FAILURE`, although it is only used for testing: 1. SENTINEL SIMULATE-FAILURE CRASH-AFTER-ELECTION 2. SENTINEL SIMULATE-FAILURE CRASH-AFTER-ELECTION CRASH-AFTER-PROMOTION
Diffstat (limited to 'src/sentinel.c')
-rw-r--r--src/sentinel.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/sentinel.c b/src/sentinel.c
index 297f0591f..e30981039 100644
--- a/src/sentinel.c
+++ b/src/sentinel.c
@@ -3726,9 +3726,9 @@ void sentinelCommand(client *c) {
" Reset masters for specific master name matching this pattern.",
"SENTINELS <master-name>",
" Show a list of Sentinel instances for this master and their state.",
-"SET <master-name> <option> <value>",
+"SET <master-name> <option> <value> [<option> <value> ...]",
" Set configuration parameters for certain masters.",
-"SIMULATE-FAILURE (CRASH-AFTER-ELECTION|CRASH-AFTER-PROMOTION|HELP)",
+"SIMULATE-FAILURE [CRASH-AFTER-ELECTION] [CRASH-AFTER-PROMOTION] [HELP]",
" Simulate a Sentinel crash.",
NULL
};
@@ -3943,7 +3943,6 @@ NULL
addReplyErrorSds(c,e);
}
} else if (!strcasecmp(c->argv[1]->ptr,"set")) {
- if (c->argc <= 3) goto numargserr;
sentinelSetCommand(c);
} else if (!strcasecmp(c->argv[1]->ptr,"config")) {
if (c->argc < 3) goto numargserr;