• antirez's avatar
    Replication: install the write handler when reusing a cached master. · df0c9600
    antirez authored
    Sometimes when we resurrect a cached master after a successful partial
    resynchronization attempt, there is pending data in the output buffers
    of the client structure representing the master (likely REPLCONF ACK
    commands).
    
    If we don't reinstall the write handler, it will never be installed
    again by addReply*() family functions as they'll assume that if there is
    already data pending, the write handler is already installed.
    
    This bug caused some slaves after a successful partial sync to never
    send REPLCONF ACK, and continuously being detected as timing out by the
    master, with a disconnection / reconnection loop.
    df0c9600
replication.c 62.3 KB