Skip to content

Remove the ADD_TRAILING_SLASH_TO_LOCATION feature flag - #5273

Open
iprithv wants to merge 2 commits into
apache:mainfrom
iprithv:deprecate/add-trailing-slash-to-location
Open

Remove the ADD_TRAILING_SLASH_TO_LOCATION feature flag#5273
iprithv wants to merge 2 commits into
apache:mainfrom
iprithv:deprecate/add-trailing-slash-to-location

Conversation

@iprithv

@iprithv iprithv commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Fixes #5269 & follow-up to the discussion on #5003 .

  • ADD_TRAILING_SLASH_TO_LOCATION is removed. Polaris now always appends a trailing slash to table and namespace base locations. Leftover keys in polaris.features or catalog properties are harmless and ignored
  • A non-severe production-readiness warning is emitted at startup if the flag is explicitly set to false (in polaris.features defaults or realm overrides), naming the exact config key.
  • The OPTIMIZED_SIBLING_CHECK description no longer references the flag: locations written by Polaris always end with a slash, and slash-less locations stored by older versions remain handled by the overlap check.

User-visible behavior change

Operators who explicitly set ADD_TRAILING_SLASH_TO_LOCATION=false will now get trailing slashes on new table/namespace locations regardless. This is the intended deprecation behavior: the flag's default has been true, and setting it to false only weakens location-overlap detection (the trailing slash is what lets prefix matching distinguish ns/tA/child from ns/tA_backup). The change is called out in CHANGELOG.md and surfaced via the readiness warning.

Note: the readiness check inspects polaris.features (defaults + realm overrides); a value set via the catalog property polaris.config.add-trailing-slash-to-location is not covered by the warning.

@github-project-automation github-project-automation Bot moved this to PRs In Progress in Basic Kanban Board Aug 11, 2026
@iprithv
iprithv force-pushed the deprecate/add-trailing-slash-to-location branch from f3b0e60 to 017d8d3 Compare August 11, 2026 12:16
@iprithv
iprithv force-pushed the deprecate/add-trailing-slash-to-location branch from 017d8d3 to b9ec958 Compare August 11, 2026 19:43
dimas-b
dimas-b previously approved these changes Aug 12, 2026
@github-project-automation github-project-automation Bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Aug 12, 2026
Polaris now always appends a trailing slash to table and namespace base
locations. The feature flag is removed: leftover keys in polaris.features
or catalog properties are harmless and ignored, and a production
readiness warning is emitted at startup if the flag is explicitly set
to false, since that is a user-visible behavior change.

Overlap tests simulate legacy slash-less stored locations by rewriting
the stored entity directly through the metastore instead of disabling
the flag, preserving coverage of the optimized sibling check against
pre-existing slash-less data.

Fixes apache#5269
@iprithv iprithv changed the title Deprecate ADD_TRAILING_SLASH_TO_LOCATION Remove the ADD_TRAILING_SLASH_TO_LOCATION feature flag Aug 13, 2026
@iprithv
iprithv force-pushed the deprecate/add-trailing-slash-to-location branch from b9ec958 to d437407 Compare August 13, 2026 16:08
Comment thread CHANGELOG.md Outdated
- Move the ADD_TRAILING_SLASH_TO_LOCATION removal note from "Breaking
  changes" to "Changes": a leftover config key is silently ignored and
  the service keeps working, so it is not a breaking change.
- Collapse the three base-location slash-normalization sites in
  LocalIcebergCatalog onto StorageLocation.ensureTrailingSlash, which
  already performs this check and is used elsewhere in the file.
@dimas-b
dimas-b requested review from flyingImer and flyrain August 14, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate ADD_TRAILING_SLASH_TO_LOCATION

4 participants