Skip to main content

select_wal_voter_index

Function select_wal_voter_index 

Source
pub fn select_wal_voter_index(
    candidates: &[(u64, u64)],
    used_nodes: &[u64],
    used_racks: &[u64],
    local_node: u64,
    require_local: bool,
) -> Option<usize>
Expand description

Select the first candidate, in the caller’s order, whose node and rack are both unused. When require_local is set, only the local broker is eligible.