Conversation
…spaces CREATE/UPDATE table notifications auto-create any missing parent namespaces via createNonExistingNamespaces before validating the proposed metadata location. A notification carrying a location outside the catalog's allowed locations therefore persisted the new namespaces first and only then failed validation, leaving them orphaned. It also let a principal holding only SEND_NOTIFICATIONS create namespaces as a side effect of a request that ultimately fails. Validate the location before creating namespaces. Because the location check needs the storage configuration of the parent hierarchy - which may not exist yet - resolve the deepest already-existing ancestor (down to the catalog root) and validate against it, mirroring what the VALIDATE notification path already does. Auto-created namespaces inherit their storage configuration from that same ancestor, so the decision is unchanged for valid notifications. The shared walk-up logic is extracted into resolveDeepestExistingStorageEntity and reused by both paths, and the now-unused two-argument validateLocationForTableLike overload is removed. Adds a regression test asserting that a notification with a disallowed location creates no namespaces.
flyingImer
approved these changes
Sep 18, 2026
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.
CREATE/UPDATE table notifications call
createNonExistingNamespacesto auto-create any missing parent namespaces before validating the proposed metadata location. A notification whose location is outside the catalog's allowed locations therefore persisted the new namespaces first and only then failed validation, leaving them orphaned. It also let a principal holding onlySEND_NOTIFICATIONScreate namespaces as a side effect of a request that ultimately fails.This validates the location before creating namespaces. Because the location check needs the storage configuration of the parent hierarchy — which may not exist yet — it resolves the deepest already-existing ancestor (down to the catalog root) and validates against it, mirroring what the
VALIDATEnotification path already does. Auto-created namespaces inherit their storage configuration from that same ancestor, so behavior is unchanged for valid notifications. The shared walk-up logic is extracted intoresolveDeepestExistingStorageEntityand reused by both paths; the now-unused 2-argvalidateLocationForTableLikeoverload is removed.