MCPcopy Create free account
hub / github.com/apache/paimon-rust / commit_retry_wait

Method commit_retry_wait

crates/paimon/src/table/table_commit.rs:860–869  ·  view source on GitHub ↗

Exponential backoff with jitter.

(&self, retry_count: u32)

Source from the content-addressed store, hash-verified

858
859 /// Exponential backoff with jitter.
860 async fn commit_retry_wait(&self, retry_count: u32) {
861 let base_wait = self
862 .commit_min_retry_wait_ms
863 .saturating_mul(2u64.saturating_pow(retry_count));
864 let wait = base_wait.min(self.commit_max_retry_wait_ms);
865 // Simple jitter: add up to 20% of wait time
866 let jitter = (wait as f64 * 0.2 * rand_f64()) as u64;
867 let total_wait = wait + jitter;
868 tokio::time::sleep(std::time::Duration::from_millis(total_wait)).await;
869 }
870
871 /// Compute partition stats (min/max/null_counts) across all entries.
872 fn compute_partition_stats(&self, entries: &[ManifestEntry]) -> Result<BinaryTableStats> {

Callers 1

try_commitMethod · 0.80

Calls 1

rand_f64Function · 0.85

Tested by

no test coverage detected