Skip to content

fix(table): route tos:// scheme to ConditionalPutCommitHandler#7824

Merged
yanghua merged 2 commits into
lance-format:mainfrom
zhangyue19921010:fix/tos-conditional-put-commit-handler
Jul 16, 2026
Merged

fix(table): route tos:// scheme to ConditionalPutCommitHandler#7824
yanghua merged 2 commits into
lance-format:mainfrom
zhangyue19921010:fix/tos-conditional-put-commit-handler

Conversation

@zhangyue19921010

@zhangyue19921010 zhangyue19921010 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

The TOS object store provider (#7019) supports atomic put-if-not-exists via OpenDAL (translated to If-None-Match: *), but commit_handler_from_url was never updated, so tos:// datasets fell through to UnsafeCommitHandler and concurrent writers could silently clobber each other's manifests.

Summary by CodeRabbit

  • Bug Fixes
    • Improved commit handling by expanding which object-storage URL schemes use conditional put behavior (reducing fallback to unsafe handling).
    • Enhanced conditional commit protection to cover additional schemes beyond memory and shared-memory, including cloud object stores.
  • Tests
    • Updated commit-handler unit tests to validate conditional-put behavior across a wider set of URL schemes.

The TOS object store provider (lance-format#7019) supports atomic put-if-not-exists
via OpenDAL (translated to `If-None-Match: *`), but commit_handler_from_url
was never updated, so tos:// datasets fell through to UnsafeCommitHandler
and concurrent writers could silently clobber each other's manifests.
@github-actions github-actions Bot added the bug Something isn't working label Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 990ce806-e365-4386-bab6-32de6d1ee9b1

📥 Commits

Reviewing files that changed from the base of the PR and between c85cc6f and 8ba0ef1.

📒 Files selected for processing (1)
  • rust/lance-table/src/io/commit.rs

📝 Walkthrough

Walkthrough

commit_handler_from_url now selects ConditionalPutCommitHandler for additional object-store URL schemes. Parameterized tests verify the expanded routing behavior.

Changes

Commit handler routing

Layer / File(s) Summary
Expand conditional-put scheme routing
rust/lance-table/src/io/commit.rs
Additional object-store schemes now select ConditionalPutCommitHandler, with parameterized unit coverage for the expanded URL scheme set.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: jackye1995, hamersaw

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately describes the primary functional change of routing tos:// to ConditionalPutCommitHandler.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@rust/lance-table/src/io/commit.rs`:
- Around line 1969-1984: Refactor
test_commit_handler_from_url_conditional_put_schemes to use rstest
parameterization instead of the manual URL loop. Add one readable named
#[case::...] entry for each scheme currently covered, and update the test to
receive and validate the case URL while preserving all existing assertions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0a001364-93a5-4530-9fb3-dd9f038f9d36

📥 Commits

Reviewing files that changed from the base of the PR and between 4f90cf4 and c85cc6f.

📒 Files selected for processing (1)
  • rust/lance-table/src/io/commit.rs

Comment thread rust/lance-table/src/io/commit.rs Outdated
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@yanghua yanghua left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks~

@yanghua
yanghua merged commit 3bece4e into lance-format:main Jul 16, 2026
36 checks passed
wjones127 pushed a commit that referenced this pull request Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants