Repository navigation
fix(io): break object store registry ownership cycle - #11365
Merged
Merged
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
Removing accessor ownership from both registry maps breaks the cycle while preserving scoped cache identity and construction parameters. The regression fails with the previous implementation and passes here; all 21 registry tests pass.
BubbleCal
approved these changes
Nov 22, 2026
Xuanwo
added a commit
that referenced
this pull request
Nov 22, 2026
`Cargo.lock` on `main` locks `url` 2.5.8, which RUSTSEC-2026-0592 marks as vulnerable: `Url::origin()` recurses once per nested `blob:` prefix, so a crafted URL overflows the stack and aborts the process. The advisory lists 2.5.9 as the first patched release. This is the cargo-deny failure currently blocking #11365. On its exact head `f2d3971dcfb0ef170a6aca634aeafb413ffc7b58`, hosted job [137205006261](https://github.com/lance-format/lance/actions/runs/45021433506/job/137205006261) fails with: ```text error[vulnerability]: Stack overflow in `Url::origin()` on nested `blob:` URLs ┌─ /github/workspace/Cargo.lock:792:1 ... ├ ID: RUSTSEC-2026-0592 ├ Solution: Upgrade to >=2.5.9 (try `cargo update -p url`) ``` This changes only the lockfile. `url` moves from 2.5.8 to 2.5.9, and `form_urlencoded` from 1.2.2 to 1.2.3, the version `url` 2.5.9 requires (`^1.2.3`). `url` is transitive here and every dependent accepts a compatible range, so `Cargo.toml`, the feature set and the 1.95 toolchain are unchanged. No advisory ignore is added. Validation at this head: - `cargo metadata --locked` and `cargo +1.95.0 metadata --locked --no-deps` pass. - `cargo tree -i [email protected] --locked` resolves one `url` 2.5.9. - `cargo deny check advisories` passes; the only output is the pre-existing warning for yanked `libsais-rs` 0.2.2, which this change does not touch. - `git diff --check` passes; the diff is 4 insertions and 4 deletions, limited to the two lockfile entries. - The published crate checksums match the lockfile: `url` 2.5.9 `f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a`, `form_urlencoded` 1.2.3 `afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e`.
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.
ObjectStoreRegistrykeeps the scoped storage-options accessor alive in both itsactive_storesandbuildingmaps. For a provider-backed accessor (namespace create), that accessor owns the namespace client and its session, which owns the same registry, so dropping the table and connection cannot release either. Weak store values and periodic pruning do not break the cycle. This blocks the valid empty nested-namespace create in lancedb/lancedb-c#151 (79f8f56,tests/test_table.cpp:604).Both maps now share a private key that stores the already resolved scoped
accessor_id()instead of the accessorArc; the full params still drive construction and refresh. Cache identity for the base/provider/wrapper, metrics prefix, scheduler mode and validation, and singleflight/retry behavior are unchanged.The added regression uses the local file provider and an options provider that holds the same registry. It fails on
f9fd19ewiththe object store cache retained the storage options providerand passes with this change.Verification
On sophon-blob, exact
f2d3971:cargo test -p lance-io --lib --profile ci test_cache_does_not_retain_storage_options_provider -- --nocaptureThe same test binary ran
object_store::providers::tests: 21 passed, 0 failed, including the base-scoped options, cache statistics, pruning, and singleflight/retry tests.The same regression on parent
f9fd19efails with the retention assertion.cargo fmt --all -- --check,git diff --check, andcargo metadata --locked --no-depspassed.Hosted Clippy, rustdoc, MSRV, Linux, macOS, Windows, Python, Java, and compatibility checks passed on
f2d3971. The dependency check fails on RUSTSEC-2026-0592 in theurl 2.5.8already locked onmain. The same check reports thelibsais-rs 0.2.2yank as a warning. #11370 updates the root lock to the patched release.