Skip to content

feat(io): make shared-memory:// provider available outside tests#6805

Merged
jackye1995 merged 1 commit into
lance-format:mainfrom
hamersaw:chore/shared-memory-not-cfg-test
May 16, 2026
Merged

feat(io): make shared-memory:// provider available outside tests#6805
jackye1995 merged 1 commit into
lance-format:mainfrom
hamersaw:chore/shared-memory-not-cfg-test

Conversation

@hamersaw
Copy link
Copy Markdown
Contributor

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 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.rsis_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

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>
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added the enhancement New feature or request label May 15, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jackye1995 jackye1995 merged commit ad9f382 into lance-format:main May 16, 2026
28 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants