You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "steveis (via GitHub)" <gi...@apache.org> on 2026/07/08 10:42:04 UTC

[PR] feat(catalog/rest): add client for atomic multi-table transaction commits [iceberg-rust]

steveis opened a new pull request, #2786:
URL: https://github.com/apache/iceberg-rust/pull/2786

   ## Which issue does this PR close?
   
   - Closes #2784.
   
   ## What changes are included in this PR?
   
   Client support for the REST spec's `POST /v1/{prefix}/transactions/commit` (atomic multi-table commits):
   
   - `Transaction::prepare_commit()` — runs the transaction's actions against its base table and returns the resulting `TableCommit` without sending it, as the per-table building block. Unlike `Transaction::commit`, it does not refresh or retry; conflict handling across a transaction group belongs to the caller (documented).
   - `CommitTransactionRequest` wire type (`table_changes: Vec<CommitTableRequest>`) — `CommitTableRequest` already documented that `identifier` must be present for this request.
   - `RestCatalog::commit_transaction(Vec<TableCommit>)` — submits the group; HTTP 409 maps to a retryable `CatalogCommitConflicts` error, other statuses mirror `update_table`'s handling. An empty commit list is a no-op that does not contact the server.
   
   Kept on `RestCatalog` rather than the `Catalog` trait since multi-table atomicity is a catalog capability, not a universal guarantee — happy to discuss trait-level capability exposure as a follow-up.
   
   Use case: a Postgres→Iceberg CDC producer committing per-cadence row deltas to many tables plus a changelog table, atomically. Validated end-to-end against Lakekeeper (which implements the endpoint): two tables, one commit, changes visible on both or neither.
   
   ## Are these changes tested?
   
   Unit tests: `prepare_commit` produces the expected updates/requirements without a catalog and errors on an empty transaction; mockito-based REST tests for the happy path (body carries `table-changes` for both tables), 409 → retryable conflict, and the empty no-op. `cargo test -p iceberg --lib` (1385) and `cargo test -p iceberg-catalog-rest --lib` (47) pass.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat(catalog/rest): add client for atomic multi-table transaction commits [iceberg-rust]

Posted by "steveis (via GitHub)" <gi...@apache.org>.
steveis commented on PR #2786:
URL: https://github.com/apache/iceberg-rust/pull/2786#issuecomment-4927894586

   Pushed 9596abc addressing review feedback from Andrei Tserakhau (built the equivalent in iceberg-go):
   
   - **Documented the 200/204 contract**: success returns no refreshed metadata, so callers must reload affected tables before building further transactions.
   - **Documented the error-mapping atomicity surface** and added an explicit 503 arm: 409 = did-not-apply, marked retryable; 500/502/503/504 = commit-state-unknown, deliberately NOT retryable (blind resubmission can double-apply).
   
   Design notes for reviewers: the base `Catalog` trait is not widened — `commit_transaction` is inherent on `RestCatalog` only. `prepare_commit` consumes the `Transaction`; unlike Go, Rust's ownership makes consume-on-prepare the safer default (a prepared transaction can't also be `commit()`ed), while still supporting the build-N-then-batch pattern.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat(catalog/rest): add client for atomic multi-table transaction commits [iceberg-rust]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2786:
URL: https://github.com/apache/iceberg-rust/pull/2786#issuecomment-5418758482

   This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat(catalog/rest): add client for atomic multi-table transaction commits [iceberg-rust]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2786:
URL: https://github.com/apache/iceberg-rust/pull/2786#issuecomment-5502461997

   This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [PR] feat(catalog/rest): add client for atomic multi-table transaction commits [iceberg-rust]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #2786: feat(catalog/rest): add client for atomic multi-table transaction commits
URL: https://github.com/apache/iceberg-rust/pull/2786


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org