-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
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.
- is related to
-
SERVER-39626 Majority committed oplog entries may be rolled back on minority nodes
- Closed
- related to
-
SERVER-39367 lastOpCommitted being reset on restart can cause sync source cycle
- Closed