Skip to main content

select_best_recovery_replica

Function select_best_recovery_replica 

Source
pub fn select_best_recovery_replica(
    candidates: &[RecoveryCandidate],
) -> Option<usize>
Expand description

Select the replica with highest (last leader epoch, log end offset) and lowest broker ID as the deterministic tie-breaker.

The contract states that ranking once, as ranks_ge: the returned index ranks at or above every candidate. None is returned exactly for an empty slice.