mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
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).
This commit is contained in:
parent
1a54d5963e
commit
88441bf18f
11
src/redis.c
11
src/redis.c
@ -2326,9 +2326,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;
|
||||
|
Loading…
Reference in New Issue
Block a user