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
Show whitespace changes
Inline
Side-by-side
src/redis.c
View file @
12ebe2ac
...
...
@@ -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
();
...
...
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