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
b849886a
Commit
b849886a
authored
May 08, 2015
by
antirez
Browse files
Sentinel: clarify arguments of SENTINEL IS-MASTER-DOWN-BY-ADDR
parent
a0cd75cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
b849886a
...
@@ -2665,7 +2665,23 @@ void sentinelCommand(redisClient *c) {
...
@@ -2665,7 +2665,23 @@ void sentinelCommand(redisClient *c) {
return
;
return
;
addReplyDictOfRedisInstances
(
c
,
ri
->
sentinels
);
addReplyDictOfRedisInstances
(
c
,
ri
->
sentinels
);
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"is-master-down-by-addr"
))
{
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"is-master-down-by-addr"
))
{
/* SENTINEL IS-MASTER-DOWN-BY-ADDR <ip> <port> <current-epoch> <runid>*/
/* SENTINEL IS-MASTER-DOWN-BY-ADDR <ip> <port> <current-epoch> <runid>
*
* Arguments:
*
* ip and port are the ip and port of the master we want to be
* checked by Sentinel. Note that the command will not check by
* name but just by master, in theory different Sentinels may monitor
* differnet masters with the same name.
*
* current-epoch is needed in order to understand if we are allowed
* to vote for a failover leader or not. Each Senitnel can vote just
* one time per epoch.
*
* runid is "*" if we are not seeking for a vote from the Sentinel
* in order to elect the failover leader. Otherwise it is set to the
* runid we want the Sentinel to vote if it did not already voted.
*/
sentinelRedisInstance
*
ri
;
sentinelRedisInstance
*
ri
;
long
long
req_epoch
;
long
long
req_epoch
;
uint64_t
leader_epoch
=
0
;
uint64_t
leader_epoch
=
0
;
...
...
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