Repository navigation
table: add shared write options and create-table options - #151
Merged
Merged
Conversation
…rite-options-v2 # Conflicts: # .github/scripts/check_abi.py # tests/test_c_enum_inputs.c
This was referenced Nov 22, 2026
…rite-options-v2 # Conflicts: # src/connection.rs
…rite-options-v2 # Conflicts: # src/connection.rs
Xuanwo
added a commit
to lance-format/lance
that referenced
this pull request
Nov 23, 2026
`ObjectStoreRegistry` keeps the scoped storage-options accessor alive in both its `active_stores` and `building` maps. 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 accessor `Arc`; 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 `f9fd19e` with `the object store cache retained the storage options provider` and 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 -- --nocapture` ``` 1 passed; 0 failed ``` The 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 `f9fd19e` fails with the retention assertion. `cargo fmt --all -- --check`, `git diff --check`, and `cargo metadata --locked --no-deps` passed. Hosted Clippy, rustdoc, MSRV, Linux, macOS, Windows, Python, Java, and compatibility checks passed on `f2d3971`. The dependency check fails on RUSTSEC-2026-0592 in the `url 2.5.8` already locked on `main`. The same check reports the `libsais-rs 0.2.2` yank as a warning. #11370 updates the root lock to the patched release.
…rite-options-v2 # Conflicts: # include/lancedb.h
This was referenced Nov 23, 2026
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.
Replacement for #145 with corrected commit authorship. Refs #125.
Adds the shared C representation of the SDK write options and a create-table entry that applies the SDK create builder options.
What changed
LanceDBWriteOptionswith aset_fieldsbitmask for max rows per file, max rows per group, max bytes per file, data storage version and stable row IDs. Omitted fields keep SDK defaults, while explicit zero/false stay distinguishable. A NULL pointer or zero mask leavesWriteOptions.lance_write_paramsunset, so default remote create still works.LanceDBCreateTableOptionsandlancedb_table_create_with_optionswith Create/Overwrite/ExistOk, namespace path, location, per-table storage options, external-blob option and optional write options. Write options are applied before the per-table storage and external-blob setters.table_outon entry and writes it only on success. The legacylancedb_table_createbehavior is unchanged and its header ownership description is corrected.namespace_path_from_cparser from connection: add multi-level namespace paths #137.Tests
table_outfailure behavior.Verification
cargo test --lib --locked: 12/12 passed on the unchanged private tree.cargo check --all-targets --locked: passed.cargo fmt --checkandgit diff --check: passed.