Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b72cecd7
Commit
b72cecd7
authored
Jun 25, 2018
by
antirez
Browse files
Sentinel command renaming: fix CONFIG SET after refactoring.
parent
91a384a5
Changes
1
Show whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
b72cecd7
...
...
@@ -3388,12 +3388,12 @@ void sentinelSetCommand(client *c) {
for (j = 3; j < c->argc; j++) {
int moreargs = (c->argc-1) - j;
option = c->argv[j]->ptr;
robj *o = c->argv[j+1];
long long ll;
int old_j = j; /* Used to know what to log as an event. */
if (!strcasecmp(option,"down-after-milliseconds") && moreargs > 0) {
/* down-after-millisecodns <milliseconds> */
value
= c->argv[++j]
->ptr
;
robj *o
= c->argv[++j];
if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0)
goto badfmt;
ri->down_after_period = ll;
...
...
@@ -3401,14 +3401,14 @@ void sentinelSetCommand(client *c) {
changes++;
} else if (!strcasecmp(option,"failover-timeout") && moreargs > 0) {
/* failover-timeout <milliseconds> */
value
= c->argv[++j]
->ptr
;
robj *o
= c->argv[++j];
if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0)
goto badfmt;
ri->failover_timeout = ll;
changes++;
} else if (!strcasecmp(option,"parallel-syncs") && moreargs > 0) {
/* parallel-syncs <milliseconds> */
value
= c->argv[++j]
->ptr
;
robj *o
= c->argv[++j];
if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0)
goto badfmt;
ri->parallel_syncs = ll;
...
...
@@ -3462,7 +3462,7 @@ void sentinelSetCommand(client *c) {
changes++;
} else if (!strcasecmp(option,"quorum") && moreargs > 0) {
/* quorum <count> */
value
= c->argv[++j]
->ptr
;
robj *o
= c->argv[++j];
if (getLongLongFromObject(o,&ll) == C_ERR || ll <= 0)
goto badfmt;
ri->quorum = ll;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment