mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Refresh good slaves count after CONFIG SET min-slaves-...
This way just after the CONFIG SET enabling the min-slaves feature it is possible to write to the database without delays.
This commit is contained in:
parent
88441bf18f
commit
915c06a96c
@ -815,10 +815,12 @@ void configSetCommand(redisClient *c) {
|
|||||||
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
||||||
ll < 0) goto badfmt;
|
ll < 0) goto badfmt;
|
||||||
server.repl_min_slaves_to_write = ll;
|
server.repl_min_slaves_to_write = ll;
|
||||||
|
refreshGoodSlavesCount();
|
||||||
} else if (!strcasecmp(c->argv[2]->ptr,"min-slaves-max-lag")) {
|
} else if (!strcasecmp(c->argv[2]->ptr,"min-slaves-max-lag")) {
|
||||||
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
||||||
ll < 0) goto badfmt;
|
ll < 0) goto badfmt;
|
||||||
server.repl_min_slaves_max_lag = ll;
|
server.repl_min_slaves_max_lag = ll;
|
||||||
|
refreshGoodSlavesCount();
|
||||||
} else if (!strcasecmp(c->argv[2]->ptr,"cluster-node-timeout")) {
|
} else if (!strcasecmp(c->argv[2]->ptr,"cluster-node-timeout")) {
|
||||||
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
||||||
ll <= 0) goto badfmt;
|
ll <= 0) goto badfmt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user