Skip to main content

heal

Function heal 

Source
pub(super) fn heal(services: &Services, scan: &Scan) -> bool
Expand description

Completes the torn writes the residue names on its own.

The pre-fix allocator put the forward and reverse rows separately, so a lost tail write leaves one half of a pair behind: a dangling winner has the forward row and wants its reverse row back, a promotable loser has the reverse row and wants the forward row its identity lost. Returns whether anything was written, which is the caller’s signal to rescan before judging the counts a heal changes.

Never run this and repair in the same pass: a promoted row is also a loser, so delete_losers would remove the reverse row the promotion just completed.