Add jitter to the commit retry backoff in `Transaction::commit`
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Transaction::build_backoff(crates/iceberg/src 配下で grep)から始め、commit.retry.* プロパティのセマンティクスを変更せずに backon::ExponentialBuilder にジッターを追加する。backon のデフォルトのジッターと、Java の最大 10% までの上限付きジッターのどちらかを選択し、その後、既存のコミットリトライテスト(CatalogCommitConflicts や commit_num_retries に言及しているもの)を見て、遅延がどのようにアサートされているかを確認する。cargo test が通り、リトライが同一間隔で発火しなくなったことが実証できれば完了。ただし、報告者が自分で PR を提出すると提案しているため、まず担当を確認すること。
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem or challenge?
Transaction::commit retries retryable errors (such as CatalogCommitConflicts from a REST 409) with exponential backoff built in Transaction::build_backoff:
ExponentialBuilder::new()
.with_min_delay(Duration::from_millis(props.commit_min_retry_wait_ms()?))
.with_max_delay(Duration::from_millis(props.commit_max_retry_wait_ms()?))
.with_total_delay(Some(Duration::from_millis(props.commit_total_retry_timeout_ms()?)))
.with_max_times(props.commit_num_retries()?)
.with_factor(2.0)
.build()
The backoff has no jitter, so every writer waits the same 100 ms, 200 ms, 400 ms, … after a conflict. When several processes append to the same table and conflict on the same commit, they retry in lockstep. Each round lets one writer through and sends the rest into the next round together, so contended writers use up commit.retry.num-retries faster than they would with retries spread out, and the catalog gets bursts of load_table + update_table requests.
We hit this while building an append-only streaming sink where many instances write to one table: in a test with 8 concurrent appenders on the memory catalog, every run had commits that lost to another writer and were retried.
The Java implementation adds jitter to commit retries (Tasks.exponentialBackoff adds a random 0–10% of the delay), so writers from different engines also behave differently on the same table today.
Describe the solution you'd like
Enable jitter in build_backoff, e.g. .with_jitter() on the backon::ExponentialBuilder. It's a one-line change, and the existing commit.retry.* properties keep their meaning.
If matching Java's bounded jitter (up to 10% on top of the delay) is preferred over backon's default jitter, that would also work. The main point is that concurrent writers shouldn't retry at exactly the same moments.
Willingness to contribute
I can contribute a PR for this, including a test.
- 主要言語
- Rust
- スター
- 1.4k
- フォーク
- 618
- 平均マージ
- 3日 22時間
- マージ済み PR(30日)
- 72
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/iceberg-rust のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
apache/iceberg-rust#3551 ·
メンテナーはふだん 2 日以内に返信
-
REST create_table omits partition spec-id; Java-based servers (Polaris) reject it対応中かも @ninglinLiu が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
apache/iceberg-rust#3469 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
V1 manifest lists written by Java lose added/existing/deleted file counts対応中かも @kacper-li-airspace-intelligence が 19 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/iceberg-rust#3445 ·
メンテナーはふだん 2 日以内に返信
-
Rename position delete index to clarify referenced data file key対応中かも @dragonknightk が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/iceberg-rust#3359 ·
メンテナーはふだん 2 日以内に返信
-
Row filter keeps every row for `<` and `<=` on a null column that is missing from the data file対応中かも @mattfaltyn が 11 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/iceberg-rust#3355 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
apache/iceberg-rust の issue をすべて見る
似ている issue
-
question
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
autoindex tests: denied loopback bind shows only PermissionDenied (255 failures), not the causeオープンfield-report
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
area:core
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
julian-hemmer/ypass#4 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
davidkodar/klipp#3426 ·
メンテナーはふだん 1 日以内に返信