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
1447d28c
Commit
1447d28c
authored
Oct 09, 2013
by
antirez
Browse files
Cluster: data_age conversion to milliseconds fixed.
parent
573c2fea
Changes
1
Show whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
1447d28c
...
@@ -1629,9 +1629,9 @@ void clusterHandleSlaveFailover(void) {
...
@@ -1629,9 +1629,9 @@ void clusterHandleSlaveFailover(void) {
/* Set data_age to the number of seconds we are disconnected from the master. */
/* Set data_age to the number of seconds we are disconnected from the master. */
if (server.repl_state == REDIS_REPL_CONNECTED) {
if (server.repl_state == REDIS_REPL_CONNECTED) {
data_age = server.unixtime - server.master->lastinteraction * 1000;
data_age =
(
server.unixtime - server.master->lastinteraction
)
* 1000;
} else {
} else {
data_age = server.unixtime - server.repl_down_since * 1000;
data_age =
(
server.unixtime - server.repl_down_since
)
* 1000;
}
}
/* Pre conditions to run the function:
/* Pre conditions to run the function:
...
...
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