This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-rust.git
The following commit(s) were added to refs/heads/main by this push:
new 46e51d80f feat(transaction): add jitter to the commit retry backoff
(#3610)
46e51d80f is described below
commit 46e51d80f78906013783c91b74f4d4ef7b4a352b
Author: Yuang Gao <[email protected]>
AuthorDate: Wed Nov 4 06:12:54 2026 +0000
feat(transaction): add jitter to the commit retry backoff (#3610)
* feat(transaction): add jitter to the commit retry backoff
* test(transaction): compare two backoffs instead of asserting jitter bounds
---
crates/iceberg/src/transaction/mod.rs | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/crates/iceberg/src/transaction/mod.rs
b/crates/iceberg/src/transaction/mod.rs
index cd31ca0a2..830a2d7e7 100644
--- a/crates/iceberg/src/transaction/mod.rs
+++ b/crates/iceberg/src/transaction/mod.rs
@@ -214,6 +214,7 @@ impl Transaction {
)))
.with_max_times(props.commit_num_retries()?)
.with_factor(2.0)
+ .with_jitter()
.build())
}
@@ -567,6 +568,18 @@ mod tests {
}
}
+ #[test]
+ fn test_commit_backoff_is_jittered() {
+ let table = setup_test_table("4");
+ let delays = || {
+ Transaction::build_backoff(table.metadata().table_properties())
+ .unwrap()
+ .collect::<Vec<_>>()
+ };
+
+ assert_ne!(delays(), delays());
+ }
+
#[tokio::test]
async fn test_transaction_snapshot_summary() {
let catalog = new_memory_catalog().await;