replication asynchronous SYNC information in INFO output
This commit is contained in:
parent
f6433915fe
commit
12ebe2ac17
13
src/redis.c
13
src/redis.c
@ -1183,12 +1183,23 @@ sds genRedisInfoString(void) {
|
||||
"master_port:%d\r\n"
|
||||
"master_link_status:%s\r\n"
|
||||
"master_last_io_seconds_ago:%d\r\n"
|
||||
"master_sync_in_progress:%d\r\n"
|
||||
,server.masterhost,
|
||||
server.masterport,
|
||||
(server.replstate == REDIS_REPL_CONNECTED) ?
|
||||
"up" : "down",
|
||||
server.master ? ((int)(time(NULL)-server.master->lastinteraction)) : -1
|
||||
server.master ? ((int)(time(NULL)-server.master->lastinteraction)) : -1,
|
||||
server.replstate == REDIS_REPL_TRANSFER
|
||||
);
|
||||
|
||||
if (server.replstate == REDIS_REPL_TRANSFER) {
|
||||
info = sdscatprintf(info,
|
||||
"master_sync_left_bytes:%ld\r\n"
|
||||
"master_sync_last_io_seconds_ago:%d\r\n"
|
||||
,(long)server.repl_transfer_left,
|
||||
(int)(time(NULL)-server.repl_transfer_lastio)
|
||||
);
|
||||
}
|
||||
}
|
||||
if (server.vm_enabled) {
|
||||
lockThreadedIO();
|
||||
|
Loading…
x
Reference in New Issue
Block a user