• zhaozhao.zz's avatar
    PSYNC2: safe free backlog when reach the time limit · 6ddf0ea2
    zhaozhao.zz authored
    When we free the backlog, we should use a new
    replication ID and clear the ID2. Since without
    backlog we can not increment master_repl_offset
    even do write commands, that may lead to inconsistency
    when we try to connect a "slave-before" master
    (if this master is our slave before, our replid
    equals the master's replid2). As the master have our
    history, so we can match the master's replid2 and
    second_replid_offset, that make partial sync work,
    but the data is inconsistent.
    6ddf0ea2
replication.c 107 KB