Skip to content

fix(tables): refuse deprecated data-path table properties - #2044

Merged
c-thiel merged 2 commits into
mainfrom
ct/exclusive-tabular-location
Sep 25, 2026
Merged

c-thiel merged 2 commits into
mainfrom
ct/exclusive-tabular-location

Conversation

@c-thiel

@c-thiel c-thiel commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

write.object-storage.path and write.folder-storage.path are refused alongside write.data.path: engines still honor these deprecated spellings and would write data files outside the table location, possibly into another tabular's location. Removing any of the three is allowed, so a table that carries one can always shed it.

Adds integration tests pinning that generic tables share the location space with Iceberg tables and views: a second tabular at the same location, its parent directory, or inside it is refused with LocationAlreadyTaken for every pairing that involves a generic table, while a sibling sharing only a string prefix is not.

Documents that the advisory locks in ensure_location_available rely on READ COMMITTED.

Summary by CodeRabbit

  • Bug Fixes
    • Table settings that direct data writes outside the table’s location can now be removed during an update. Setting these properties remains disallowed, and removing unsupported metadata-path properties is still rejected.

`write.object-storage.path` and `write.folder-storage.path` are refused
alongside `write.data.path`: engines still honor these deprecated
spellings and would write data files outside the table location,
possibly into another tabular's location. Removing any of the three is
allowed, so a table that carries one can always shed it.

Adds integration tests pinning that generic tables share the location
space with Iceberg tables and views: a second tabular at the same
location, its parent directory, or inside it is refused with
`LocationAlreadyTaken` for every pairing that involves a generic table,
while a sibling sharing only a string prefix is not.

Documents that the advisory locks in `ensure_location_available` rely
on READ COMMITTED.
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 9c982c7d-1591-44ce-9de7-40a8a7de2fe8

📥 Commits

Reviewing files that changed from the base of the PR and between f12e6ed and ec4ef0b.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: b294797e-ca80-48bc-92a4-c0962e5993e8

📥 Commits

Reviewing files that changed from the base of the PR and between 5ee666d and f12e6ed.

📒 Files selected for processing (3)
  • crates/lakekeeper-integration-tests/tests/generic_table_location_collision.rs
  • crates/lakekeeper-storage-postgres/src/tabular/mod.rs
  • crates/lakekeeper/src/server/tables.rs

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


Walkthrough

The pull request adds integration tests for generic-table location collisions, updates table-property validation for data-path properties, and revises a comment about PostgreSQL location checks.

Changes

Tabular location collision coverage

Layer / File(s) Summary
Location test setup
crates/lakekeeper-integration-tests/tests/generic_table_location_collision.rs
Adds warehouse and namespace setup, tabular-kind and location-relationship definitions, and a helper to create tables, views, or generic tables at specified locations.
Collision and sibling-location cases
crates/lakekeeper-integration-tests/tests/generic_table_location_collision.rs, crates/lakekeeper-storage-postgres/src/tabular/mod.rs
Tests that five ordered pairings involving generic tables reject colliding locations with HTTP 409 LocationAlreadyTaken, while sibling paths are accepted. Updates a comment to describe advisory-lock serialization and the READ COMMITTED snapshot behavior.

Table property validation

Layer / File(s) Summary
Data-path property validation
crates/lakekeeper/src/server/tables.rs
Rejects setting properties with the write.data.path, write.object-storage.path, and write.folder-storage.path prefixes. Allows their removal, while removal of unsupported write.metadata.path remains rejected.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to f12e6

No actionable merge-blocking issue is established; the PR is mergeable after normal checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to f12e6

The changed validation restricts properties that could direct data writes outside a table’s location while allowing existing tables to remove them. The location tests add no public endpoint. Coverage of every table-creation path and concurrent behavior remains incomplete, so the risk assessment is low rather than minimal.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — A caller able to commit table-property changes could otherwise direct a supporting engine’s writes outside the table location; this change tightens validation of that input. The observed collision query protects locations within one warehouse, not across warehouse IDs.

Security Findings and Attack Paths

  • observed — For transaction commits, supplied property-set keys pass through validation that rejects the three data-path prefixes; removal of those prefixes passes while other unsupported removals remain subject to validation.

Trust Boundaries and Controls

  • observed — The test helper supplies locations to existing table, view, and generic-table creation methods; it is not a newly exposed request handler. The storage check uses transaction-scoped advisory locks and returns LocationAlreadyTaken when its warehouse-scoped query finds a conflict.

Resilience and Maintainability Implications

  • observed — The added collision cases create their tabulars sequentially. They exercise cross-kind location results but do not establish the advisory-lock behavior under concurrent creation.

Hardening Proposals

  • proposed — Verify the changed property restriction through initial table creation as well as commit requests, and exercise concurrent cross-kind creation when relying on the documented lock and isolation invariant.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: rejecting deprecated data-path table properties. The additional location-collision tests and documentation support the pull request but do not make the ti…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks each path with care,
Three data keys are tested there.
Sibling trails may both proceed,
Collisions meet a clear 409 indeed.
Then hops away through moonlit snow.

Comment @coderabbitai help to get the list of available commands.

@c-thiel
c-thiel enabled auto-merge (squash) September 25, 2026 11:56
@github-actions

Copy link
Copy Markdown
Contributor

✅ PR Title Formatted Correctly

The title of this PR match the correct format. Thank you!

@c-thiel
c-thiel merged commit b771dbf into main Sep 25, 2026
73 checks passed
@c-thiel
c-thiel deleted the ct/exclusive-tabular-location branch September 25, 2026 16:59
brgr-s pushed a commit that referenced this pull request Oct 15, 2026
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.

1 participant