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
5d83f6cf
Commit
5d83f6cf
authored
Jun 15, 2016
by
Salvatore Sanfilippo
Committed by
GitHub
Jun 15, 2016
Browse files
Merge pull request #3274 from MOON-CLJ/fix_promoted_slave
Sentinel: fix check when can't send the command to the promoted slave
parents
3bd20ea2
aa578446
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/sentinel.c
View file @
5d83f6cf
...
@@ -3996,7 +3996,7 @@ void sentinelFailoverSendSlaveOfNoOne(sentinelRedisInstance *ri) {
...
@@ -3996,7 +3996,7 @@ void sentinelFailoverSendSlaveOfNoOne(sentinelRedisInstance *ri) {
/* We can't send the command to the promoted slave if it is now
/* We can't send the command to the promoted slave if it is now
* disconnected. Retry again and again with this state until the timeout
* disconnected. Retry again and again with this state until the timeout
* is reached, then abort the failover. */
* is reached, then abort the failover. */
if
(
ri
->
link
->
disconnected
)
{
if
(
ri
->
promoted_slave
->
link
->
disconnected
)
{
if
(
mstime
()
-
ri
->
failover_state_change_time
>
ri
->
failover_timeout
)
{
if
(
mstime
()
-
ri
->
failover_state_change_time
>
ri
->
failover_timeout
)
{
sentinelEvent
(
LL_WARNING
,
"-failover-abort-slave-timeout"
,
ri
,
"%@"
);
sentinelEvent
(
LL_WARNING
,
"-failover-abort-slave-timeout"
,
ri
,
"%@"
);
sentinelAbortFailover
(
ri
);
sentinelAbortFailover
(
ri
);
...
...
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