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
4ccf807a
Commit
4ccf807a
authored
Nov 13, 2013
by
antirez
Browse files
Sentinel: safer slave reconfig, master reported role should match.
parent
e98d82c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
4ccf807a
...
...
@@ -1607,6 +1607,7 @@ void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) {
/* Make sure the master is sane before reconfiguring this instance
* into a slave. */
if
(
ri
->
master
->
flags
&
SRI_MASTER
&&
ri
->
master
->
role_reported
==
SRI_MASTER
&&
(
ri
->
master
->
flags
&
(
SRI_S_DOWN
|
SRI_O_DOWN
))
==
0
&&
(
mstime
()
-
ri
->
master
->
info_refresh
)
<
SENTINEL_INFO_PERIOD
*
2
)
{
...
...
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