Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
12ebe2ac
Commit
12ebe2ac
authored
Nov 04, 2010
by
antirez
Browse files
replication asynchronous SYNC information in INFO output
parent
f6433915
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis.c
View file @
12ebe2ac
...
@@ -1183,12 +1183,23 @@ sds genRedisInfoString(void) {
...
@@ -1183,12 +1183,23 @@ sds genRedisInfoString(void) {
"master_port:%d\r\n"
"master_port:%d\r\n"
"master_link_status:%s\r\n"
"master_link_status:%s\r\n"
"master_last_io_seconds_ago:%d\r\n"
"master_last_io_seconds_ago:%d\r\n"
"master_sync_in_progress:%d\r\n"
,server.masterhost,
,server.masterhost,
server.masterport,
server.masterport,
(server.replstate == REDIS_REPL_CONNECTED) ?
(server.replstate == REDIS_REPL_CONNECTED) ?
"up" : "down",
"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) {
if (server.vm_enabled) {
lockThreadedIO();
lockThreadedIO();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment