Skip to main content

tombstone_winner

Function tombstone_winner 

Source
pub fn tombstone_winner(a: &Record, b: &Record, cap: usize) -> Record
Expand description

Resolve two diverged tombstones for one key (spec §3.4, §3.5): the one with the higher (counter, hash) wins and carries ancestors reconciled from both.

Symmetric whenever a.revision != b.revision. Callers skip equal revisions before reaching this, because independent deletes of the same revision are already in sync. Both arguments must be tombstones.