Skip to main content

retry_serializable

Function retry_serializable 

Source
pub async fn retry_serializable<F, Fut, T, E>(f: F) -> Result<T, E>
where F: FnMut() -> Fut, Fut: Future<Output = Result<T, E>>, E: IsRetryableBusy,
Expand description

Runs f up to MAX_ATTEMPTS times, retrying when the error classifies as transient busy contention. Between retries, sleeps 5ms * 2^attempt to match the PG reference shape.