• A
    Sentinel: abort failover when in wait-start if master is back. · 75084e05
    antirez 提交于
    When we are a Leader Sentinel in wait-start state, starting with this
    commit the failover is aborted if the master returns online.
    
    This improves the way we handle a notable case of net split, that is the
    split between Sentinels and Redis servers, that will be a very common
    case of split becase Sentinels will often be installed in the client's
    network and servers can be in a differnt arm of the network.
    
    When Sentinels and Redis servers are isolated the master is in ODOWN
    condition since the Sentinels can agree about this state, however the
    failover does not start since there are no good slaves to promote (in
    this specific case all the slaves are unreachable).
    
    However when the split is resolved, Sentinels may sense the slave back
    a moment before they sense the master is back, so the failover may start
    without a good reason (since the master is actually working too).
    
    Now this condition is reversible, so the failover will be aborted
    immediately after if the master is detected to be working again, that
    is, not in SDOWN nor in ODOWN condition.
    75084e05
sentinel.c 106.1 KB