Skip location overlap validation when namespace location is unchanged - #5172
Open
ayushtkn wants to merge 1 commit into
Open
Skip location overlap validation when namespace location is unchanged#5172ayushtkn wants to merge 1 commit into
ayushtkn wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces unnecessary work when updating namespace properties by skipping sibling location-overlap validation unless the namespace location actually changes, aligning namespace updates with the existing table/view validation behavior.
Changes:
- Gate namespace sibling location-overlap validation in
LocalIcebergCatalog#setPropertieson whether the namespace base location changed. - Add a regression test that asserts overlap validation work (via metastore
listEntitiescalls) is performed only whenlocationis updated.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalog.java | Skips location-overlap validation on namespace property updates when the base location is unchanged. |
| runtime/service/src/test/java/org/apache/polaris/service/catalog/iceberg/IcebergAllowedLocationTest.java | Adds a test to verify overlap validation is triggered only on namespace location changes. |
vigneshio
approved these changes
Jul 28, 2026
vigneshio
left a comment
Contributor
There was a problem hiding this comment.
LGTM...
nits: missing / in the namespace location format string, and the listEntities spy may be brittle if OPTIMIZED_SIBLING_CHECK is on - consider pinning it false... WDYT ??
vigneshio
approved these changes
Jul 28, 2026
adutra
approved these changes
Jul 28, 2026
iprithv
approved these changes
Jul 28, 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.
updateNamespacePropertiesruns the sibling location-overlap validation on every namespace property update, even when the update leaves the namespace location untouched.That check scales with the number of sibling tables and namespaces, so a trivial update such as setting owner can do a significant amount of work purely to verify a base location that did not change. This change gates the check on the location actually changing, which is how the table and view commit paths already gate the same validation, and leaves behaviour identical whenever the location is modified.
Checklist
CHANGELOG.md(if needed)site/content/in-dev/unreleased(if needed)