Skip to main content

run_with_retry

Function run_with_retry 

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

Run a commit-action against the given iceberg table with retry.

  1. Calls reload_table before each commit attempt to get the latest metadata
  2. If reload_table fails (table not exists/schema/partition mismatch), stops retrying immediately
  3. If commit fails, retries with backoff up to retry_num times.

Strategy: exponential backoff 10ms→60s with jitter, up to retry_num retries.