Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-39831

Never update commit point beyond last applied if learned from sync source

    • Fully Compatible
    • v4.0, v3.6
    • Repl 2019-03-25, Repl 2019-04-08
    • 16

      SERVER-39367 ensures the correctness of commit point learning protocol, but it can cause stale secondaries to hold large history after restart since its commit point cannot advance until its oplog reaches the latest term.

      We can relax the term check when learning from sync source but only update its commit point to min(commit point, my last applied). Given that requiring the term check on learning commit point ensures that the commit point is always on a node's branch, spanning tree ensures the syncing node is on the same branch as the sync source, so the syncing node knows it's on the same branch as the commit point even if they have different terms.

      This ticket also fixes the issue where a secondary learns of the commit point in higher term from sync source, then syncs from another node on a diverged branch in lower term and marks the diverged branch committed by mistake. Thus this needs to be backported to earlier versions.

            Assignee:
            tess.avitabile@mongodb.com Tess Avitabile (Inactive)
            Reporter:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: