Commit 915c06a9 authored by antirez's avatar antirez
Browse files

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.
parent 88441bf1
......@@ -815,10 +815,12 @@ void configSetCommand(redisClient *c) {
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
ll < 0) goto badfmt;
server.repl_min_slaves_to_write = ll;
refreshGoodSlavesCount();
} else if (!strcasecmp(c->argv[2]->ptr,"min-slaves-max-lag")) {
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
ll < 0) goto badfmt;
server.repl_min_slaves_max_lag = ll;
refreshGoodSlavesCount();
} else if (!strcasecmp(c->argv[2]->ptr,"cluster-node-timeout")) {
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
ll <= 0) goto badfmt;
......
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