pub async fn with_transaction_retry<C, F, T, E, P>(
db: &C,
config: &RetryConfig,
operation: F,
should_retry: P,
) -> Result<T, E>Expand description
Runs a complete transaction boundary with bounded retries selected by the product.
The callback is rerun only after rollback or a commit failure known to have rolled back the
transaction. Any commit error with an uncertain server-side outcome is returned as
DbError::CommitOutcomeUnknown, because the server may have committed the transaction even
though the client did not receive a success response.
Use crate::retry::RetryConfig::deadlock as the config profile: deadlock and
serialization conflicts resolve inside short lock-wait windows, so the fast profile fits.