提交 971217c7 编写于 作者: A antirez

New INFO field "min_slaves_good_slaves".

When min-slaves-to-write feature is active, this field reports the
number of slaves considered good (online state, lag within the specified
range).
上级 f5275da6
......@@ -2253,9 +2253,20 @@ sds genRedisInfoString(char *section) {
server.slave_priority,
server.repl_slave_ro);
}
info = sdscatprintf(info,
"connected_slaves:%lu\r\n",
listLength(server.slaves));
/* If min-slaves-to-write is active, write the number of slaves
* currently considered 'good'. */
if (server.repl_min_slaves_to_write &&
server.repl_min_slaves_max_lag) {
info = sdscatprintf(info,
"min_slaves_good_slaves:%d\r\n",
server.repl_good_slaves_count);
}
if (listLength(server.slaves)) {
int slaveid = 0;
listNode *ln;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册