Skip to main content

IndexBuildProgress

Trait IndexBuildProgress 

Source
pub trait IndexBuildProgress:
    Debug
    + Sync
    + Send {
    // Required methods
    fn stage_start<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        stage: &'life1 str,
        total: Option<u64>,
        unit: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn stage_progress<'life0, 'life1, 'async_trait>(
        &'life0 self,
        stage: &'life1 str,
        completed: u64,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn stage_complete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        stage: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Progress callback for index building and distributed index finalization.

Called at stage boundaries during index construction. For a single logical stream, stages are sequential: stage_complete is always called before the next stage_start, so only one stage is active at a time. Callers that orchestrate independent sub-builds in parallel may prefix stage names (for example segment_plan[0]/merge_partitions) to represent separate logical streams. Stage names are index-type-specific (e.g. “train_ivf”, “shuffle”, “merge_partitions” for vector indices; “load_data”, “build_pages” for scalar indices; merge/finalization stages for distributed index construction).

Methods take &self to allow concurrent calls from within a single stage. Implementations must be thread-safe.

Required Methods§

Source

fn stage_start<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, stage: &'life1 str, total: Option<u64>, unit: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

A named stage has started.

total is the number of work units if known, and unit describes what is being counted (e.g. “partitions”, “batches”, “rows”).

Source

fn stage_progress<'life0, 'life1, 'async_trait>( &'life0 self, stage: &'life1 str, completed: u64, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Progress within the current stage.

Source

fn stage_complete<'life0, 'life1, 'async_trait>( &'life0 self, stage: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

A named stage has completed.

Implementors§