Commit 5d83f6cf authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
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
...@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment