Skip to main content

run_with_retry_from_table

Function run_with_retry_from_table 

Source
pub async fn run_with_retry_from_table<F, Fut, Out>(
    initial_table: Option<Table>,
    catalog: Arc<dyn Catalog>,
    table_ident: TableIdent,
    schema_id: i32,
    partition_spec_id: i32,
    format_version: Option<FormatVersion>,
    retry_num: usize,
    log_context: CommitRetryLogContext,
    commit_action: F,
) -> Result<Out>
where F: Fn(Table) -> Fut + Send + Sync, Fut: Future<Output = Result<Out, CommitError>> + Send,
Expand description

Same as run_with_retry, but when initial_table is set the first attempt runs against it (after the same metadata validation) instead of reloading it from the catalog. Use this when the caller loaded the table right before the commit: a stale table only costs a commit conflict, and every retry reloads. initial_table must be the table named by table_ident.