• antirez's avatar
    Sentinel: fix delay in detecting ODOWN. · 8631e647
    antirez authored
    See issue #2819 for details. The gist is that when we want to send INFO
    because we are over the time, we used to send only INFO commands, no
    longer sending PING commands. However if a master fails exactly when we
    are about to send an INFO command, the PING times will result zero
    because the PONG reply was already received, and we'll fail to send more
    PINGs, since we try only to send INFO commands: the failure detector
    will delay until the connection is closed and re-opened for "long
    timeout".
    
    This commit changes the logic so that we can send the three kind of
    messages regardless of the fact we sent another one already in the same
    code path. It could happen that we go over the message limit for the
    link by a few messages, but this is not significant. However now we'll
    not introduce delays in sending commands just because there was
    something else to send at the same time.
    8631e647
sentinel.c 166 KB