Iceberg: correctly retry commit on conflict#35428
Iceberg: correctly retry commit on conflict#35428DAlperin wants to merge 1 commit intoMaterializeInc:mainfrom
Conversation
PR SummaryMedium Risk Overview The commit path now retries with carried-forward table state ( Written by Cursor Bugbot for commit 940e235. This will update automatically on new commits. Configure here. |
|
Thanks for opening this PR! Here are a few tips to help make the review process smooth for everyone. PR title guidelines
Pre-merge checklist
|
|
Thanks, rebased the test on your PR: https://buildkite.com/materialize/nightly/builds/15550 |
eb61797 to
98e2b74
Compare
|
bugbot run |
| e | ||
| ))); | ||
| } | ||
| }; |
There was a problem hiding this comment.
Duplicated error message in apply failure path
Low Severity
The action.apply(tx) result is first wrapped with .context("Failed to apply data file addition to iceberg table transaction"), then in the Err branch, the resulting error e is formatted into a new anyhow! with the exact same prefix message. Since Display on the anyhow::Error shows the outermost context, the final error message will read "Failed to apply data file addition to iceberg table transaction: Failed to apply data file addition to iceberg table transaction: <original error>". Either the .context() call or the custom anyhow! message is redundant.
src/storage/src/sink/iceberg.rs
Outdated
| let frontier_json = serde_json::to_string(&frontier.elements()) | ||
| .context("Failed to serialize frontier to JSON")?; | ||
| #[allow(clippy::disallowed_types)] | ||
| let snapshot_properties: std::collections::HashMap<String, String> = vec

Fixes #11229. Paired with #35397 for tests.