You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9846834
Browse filesBrowse the repository at this point in the historyBrowse files
feat: add synchronous index prewarm C and C++ APIs (#94)
C and C++ callers currently cannot invoke the Rust SDK's index prewarm
operation before serving queries. Add
`lance_dataset_prewarm_index(dataset, index_name)` and
`Dataset::prewarm_index(index_name)` as synchronous bindings to the
existing SDK method.
The operation uses one dataset snapshot and its existing session,
prewarms all segments of the named logical index, and preserves the
dataset version. It uses the established FFI error/panic handling and
rejects NULL, empty, and invalid UTF-8 arguments. The README and public
header explain shared-session reuse, eviction, partial failures,
snapshot scope, and the distinction between index prewarming and
result-row reads. No Lance Rust or dependency changes are required.
Tests cover invalid inputs, missing indexes, multi-segment B-tree and
IVF-Flat indexes, historical snapshots after index removal, repeated
calls, and dataset/session handle lifetimes. An independent cold query
records partition loads; queries from a newly opened handle sharing the
prewarmed session return the expected nearest neighbors with zero
partition loads. C and C++ runtime tests exercise the exported symbol
and wrapper.
Validation:
- `cargo fmt -- --check`
- `cargo check --all-targets`
- `cargo clippy --all-targets -- -D warnings`
- `cargo test` — 479 passed, 0 failed (3 separately executed tests
ignored by default)
- `cargo test --test compile_and_run_test -- --ignored --test-threads=1`
— 3 passed, 0 failed
Implements the upstream binding portion of M1 in
apache/doris#68692. The Doris dependency
update and synchronous SQL integration remain separate follow-up work
after this merges.
0 commit comments