laserninja opened a new pull request, #10675:
URL: https://github.com/apache/gravitino/pull/10675
### What changes were proposed in this pull request?
Implements the missing `POST /v1/{prefix}/transactions/commit` endpoint in
Gravitino's Iceberg REST catalog server, following the Iceberg REST Catalog API
spec for atomic multi-table commits via `CommitTransactionRequest`.
**New files:**
- `IcebergTransactionOperationDispatcher` — interface
- `IcebergTransactionOperationExecutor` — core implementation calling
`IcebergCatalogWrapper.commitTransaction()`
- `IcebergTransactionEventDispatcher` — pre/success/failure event dispatch
layer
- `IcebergTransactionHookDispatcher` — hook execution layer
- `IcebergCommitTransactionPreEvent`, `IcebergCommitTransactionEvent`,
`IcebergCommitTransactionFailureEvent`
- `IcebergTransactionOperations` — JAX-RS resource for the endpoint
**Modified files:**
- `OperationType` — add `COMMIT_TRANSACTION`
- `IcebergCatalogWrapper` — add `commitTransaction()` iterating
`tableChanges()`
- `RESTService` — wire dispatcher chain and bind to DI container
- `IcebergConfigOperations` — advertise `Endpoint.V1_COMMIT_TRANSACTION` in
`/v1/config`
### Why are the changes needed?
The Iceberg REST spec defines `POST /v1/{prefix}/transactions/commit` for
atomic multi-table commits. Without it, clients performing cross-table
operations (e.g., Spark multi-table writes) cannot use Gravitino as an Iceberg
REST catalog.
Fix: #10674
### Does this PR introduce _any_ user-facing change?
Yes — new REST endpoint `POST /v1/{prefix}/transactions/commit` is now
available and advertised in the `/v1/config` response.
### How was this patch tested?
Added `TestIcebergTransactionOperations` with parameterized tests covering:
- Successful multi-table transaction commit → HTTP 204 + success event
- Table-not-found → HTTP 404 + failure event
- Endpoint works correctly with URL prefix
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]