feat(io): make shared-memory:// provider available outside tests#6805
Merged
jackye1995 merged 1 commit intoMay 16, 2026
Merged
Conversation
The `shared-memory://` object store provider (added in lance-format#6753) was gated behind `#[cfg(test)]`, so it only compiled for this project's own test builds. Downstream crates and integration harnesses that depend on lance-io could never resolve the scheme. Remove the `#[cfg(test)]` gates from the four production sites that make the provider functional: - module declaration and default-registry registration (providers.rs) - is_cloud() classification (object_store.rs) - commit-handler routing to ConditionalPutCommitHandler (commit.rs) The provider remains strictly opt-in (callers must use the `shared-memory://` scheme), so existing `memory://` behavior is unchanged. The in-module test suite stays `#[cfg(test)]`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
jackye1995
approved these changes
May 16, 2026
geruh
pushed a commit
to geruh/lance
that referenced
this pull request
May 16, 2026
…ce-format#6805) ## Summary The `shared-memory://` object store provider (added in lance-format#6753) was gated behind `#[cfg(test)]`, so it only compiled for this project's own test builds. Downstream crates and integration harnesses depending on `lance-io` could never resolve the scheme — which defeats the purpose of having a shareable, cross-component in-memory store. This removes the `#[cfg(test)]` gates from the four production sites required for the provider to function: - **`providers.rs`** — module declaration + registration in `ObjectStoreRegistry::default()` - **`object_store.rs`** — `is_cloud()` classification (folded into the existing local/`memory` check) - **`commit.rs`** — commit-handler routing to `ConditionalPutCommitHandler` (folded into the existing cloud-scheme arm) The provider stays strictly **opt-in**: callers must explicitly use the `shared-memory://` scheme, so existing `memory://` per-call isolation is unchanged. The in-module `#[cfg(test)] mod tests` remains test-only. ## Testing - `cargo check -p lance-io -p lance-table` — clean - `cargo clippy -p lance-io -p lance-table --tests -- -D warnings` — clean - `cargo test -p lance-io shared_memory` — 5/5 pass - `cargo test -p lance-table test_commit_handler_from_url_memory_schemes` — pass 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
The
shared-memory://object store provider (added in #6753) was gated behind#[cfg(test)], so it only compiled for this project's own test builds. Downstream crates and integration harnesses depending onlance-iocould never resolve the scheme — which defeats the purpose of having a shareable, cross-component in-memory store.This removes the
#[cfg(test)]gates from the four production sites required for the provider to function:providers.rs— module declaration + registration inObjectStoreRegistry::default()object_store.rs—is_cloud()classification (folded into the existing local/memorycheck)commit.rs— commit-handler routing toConditionalPutCommitHandler(folded into the existing cloud-scheme arm)The provider stays strictly opt-in: callers must explicitly use the
shared-memory://scheme, so existingmemory://per-call isolation is unchanged. The in-module#[cfg(test)] mod testsremains test-only.Testing
cargo check -p lance-io -p lance-table— cleancargo clippy -p lance-io -p lance-table --tests -- -D warnings— cleancargo test -p lance-io shared_memory— 5/5 passcargo test -p lance-table test_commit_handler_from_url_memory_schemes— pass🤖 Generated with Claude Code