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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.13, 4.1.10, 4.0.10
    • Component/s: Replication
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.0, v3.6
    • Sprint:
      Repl 2019-03-25, Repl 2019-04-08
    • Linked BF Score:
      16

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: