• Binbin's avatar
    Fix WAITAOF mix-use last_offset and last_numreplicas (#11922) · 58285a6e
    Binbin authored
    There be a situation that satisfies WAIT, and then wrongly unblock
    WAITAOF because we mix-use last_offset and last_numreplicas.
    
    We update last_offset and last_numreplicas only when the condition
    matches. i.e. output of either replicationCountAOFAcksByOffset or
    replicationCountAcksByOffset is right.
    
    In this case, we need to have separate last_ variables for each of
    them. Added a last_aof_offset and last_aof_numreplicas for WAITAOF.
    
    WAITAOF was added in #11713. Found while coding #11917.
    A Test was added to validate that case.
    58285a6e
server.h 175 KB