Skip to main content

check_bootstrap_drained

Function check_bootstrap_drained 

Source
pub async fn check_bootstrap_drained(
    bootstrap_state: &Arc<RwLock<BootstrapState>>,
    queues: &ReplicationQueues,
) -> bool
Expand description

Check if bootstrap is drained and update state if so.

Bootstrap is drained when:

  1. All bootstrap peer requests have completed.
  2. All bootstrap-discovered keys have left the pipeline (no longer in PendingVerify, FetchQueue, or InFlightFetch).

Returns true if bootstrap is (now) drained.