• antirez's avatar
    Sentinel: always redirect on master->slave transition. · d2ff5ed6
    antirez authored
    Sentinel redirected to the master if the instance changed runid or it
    was the first time we got INFO, and a role change was detected from
    master to slave.
    
    While this is a good idea in case of slave->master, since otherwise we
    could detect a failover without good reasons just after a reboot with a
    slave with a wrong configuration, in the case of master->slave
    transition is much better to always perform the redirection for the
    following reasons:
    
    1) A Sentinel may go down for some time. When it is back online there is
    no other way to understand there was a failover.
    2) Pointing clients to a slave seems to be always the wrong thing to do.
    3) There is no good rationale about handling things differently once an
    instance is rebooted (runid change) in that case.
    d2ff5ed6
sentinel.c 117 KB