Skip to main content

plan_force_remove

Function plan_force_remove 

Source
pub fn plan_force_remove(
    order: &ForceRemoveOrder,
    membership: &MembershipCatalog,
    ownership: &ShardOwnershipCatalog,
    signals: &impl ClusterSignals,
) -> ForceRemovePlan
Expand description

Plan the forced removal of a dead/unrecoverable member without mutating any catalog, under the ADR 0037 forced-ownership rules. For each owned range, pick the best surviving replica (preferring one that covers the commit watermark, then the furthest-applied) and force-promote it; a range with no surviving replica is recorded as unrecoverable. For each replicated range, drop the dead member’s copy.