[Cherry-pick to branch-1.2] [#10766] fix(iceberg): skip table import for staged creates in IcebergTableHookDispatcher (#10767)#10802
Merged
Conversation
…gTableHookDispatcher (#10767) <!-- 1. Title: [#<issue>] <type>(<scope>): <subject> Examples: - "[#123] feat(operator): Support xxx" - "[#233] fix: Check null before access result in xxx" - "[MINOR] refactor: Fix typo in variable name" - "[MINOR] docs: Fix typo in README" - "[#255] test: Fix flaky test NameOfTheTest" Reference: https://www.conventionalcommits.org/en/v1.0.0/ 2. If the PR is unfinished, please mark this PR as draft. --> ### What changes were proposed in this pull request? When credential vending is enabled, `IcebergTableHookDispatcher.createTable()` now skips `importTable()` and `setTableOwner()` for staged creates (`stageCreate=true`). Instead, the import and ownership assignment are deferred to `updateTable()`, which checks if the table entity already exists in the EntityStore and, if not (i.e., a staged create being committed), performs the import and ownership setup at that point. ### Why are the changes needed? With credential vending enabled, Trino sends all CREATE TABLE requests with `stageCreate=true`. The Iceberg REST protocol stages the table (builds metadata in memory without committing) and returns vended credentials. The table is only committed to the catalog when the client later calls `updateTable`. `IcebergTableHookDispatcher.createTable()` unconditionally called `importTable()`, which tried to load the non-existent table from the catalog and threw `NoSuchTableException`, failing every table create when credential vending is active. Fix: #10766 ### Does this PR introduce _any_ user-facing change? No. This fixes an internal error that prevented table creation when credential vending was enabled. No API or property changes. ### How was this patch tested? - Unit tests - Also tested this with a dev Gravitino deployment # Conflicts: # iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/dispatcher/IcebergTableHookDispatcher.java
roryqi
pushed a commit
that referenced
this pull request
Apr 17, 2026
…for staged creates in IcebergTableHookDispatcher (#10767) (#10802) **Cherry-pick Information:** - Original commit: 12d878f - Target branch: `branch-1.2` - Status:⚠️ **Has conflicts - manual resolution required** Please review and resolve the conflicts before merging. --------- Co-authored-by: Bharath Krishna <bmurali@roku.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick Information:
branch-1.2Please review and resolve the conflicts before merging.