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
a46f841d
Commit
a46f841d
authored
Nov 28, 2013
by
antirez
Browse files
Sentinel: log vote received from other Sentinels.
parent
e5c577e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
a46f841d
...
...
@@ -2653,6 +2653,11 @@ void sentinelReceiveIsMasterDownReply(redisAsyncContext *c, void *reply, void *p
/* If the runid in the reply is not "*" the Sentinel actually
* replied with a vote. */
sdsfree
(
ri
->
leader
);
if
(
ri
->
leader_epoch
!=
r
->
element
[
2
]
->
integer
)
redisLog
(
REDIS_WARNING
,
"%s voted for %s %llu"
,
ri
->
name
,
r
->
element
[
1
]
->
str
,
(
unsigned
long
long
)
r
->
element
[
2
]
->
integer
);
ri
->
leader
=
sdsnew
(
r
->
element
[
1
]
->
str
);
ri
->
leader_epoch
=
r
->
element
[
2
]
->
integer
;
}
...
...
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