Repository navigation
fix: write the inferred index list back where load_indices reads it - #68
Merged
Merged
Conversation
`load_indices` reads the manifest's index list from the unpartitioned
`manifest_index_cache`, because that list is not translated through the fragment
reuse index and `load_manifest` prefetches it there before any remap form is known.
The `infer_missing_vector_details` write-back was left on the remap-partitioned
handle, so producer and consumer disagree one level down.
Inference is therefore never observed: the entry it writes sits where no reader
looks, so it re-runs on every `load_indices` -- scan planning, `validate()` and
every commit -- and each call leaves another unreachable entry admitted against the
byte-bounded cache. Silent, since the returned value is correct either way;
inference runs in memory before the write. Datasets with no legacy vector indices
are unaffected, as `infer_missing_vector_details` returns early for them.
Tested by reading the cache back, not by calling `load_indices` twice: inference
runs on every call, outside the cache closure, and is deterministic, so a second
call returns inferred details whichever handle was written. The test seeds the cache
with a `VectorIndexDetails` whose value is empty and asserts the entry is non-empty
afterwards. Checked non-vacuous by restoring the partitioned handle:
the cached list still has empty details, so the inferred list was written to a
handle that no reader reads
Seeded directly rather than by doctoring a manifest, because a committed manifest
has its details inferred and persisted, after which inference is a no-op and this
branch is never entered.
Verified locally only: `.github/workflows/rust.yml` on this branch triggers on
`release/**`, which `release-8.0.0` does not match, so no Rust CI runs here.
`cargo fmt --all -- --check`, `cargo clippy --all --tests --benches -- -D warnings`
and `cargo test -p lance` (2059 passed) are green.
Backport of #59's `455d1278b` (release-10.0.0), adapted: this base's
`IndexMetadataKey` has no `store_identity` field, so the test's key literal carries
only `version`.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
zehiko
approved these changes
Sep 2, 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.
load_indicesreads the manifest's index list from the unpartitionedmanifest_index_cache— that list is not translated through the fragment reuse index, andload_manifestprefetches it there before any remap form is known. Theinfer_missing_vector_detailswrite-back was left on the remap-partitionedindex_cache, so producer and consumer disagree.Inference is never observed: the entry lands where no reader looks, so it re-runs on every
load_indices— scan planning,validate(), every commit — and each call leaves another unreachable entry admitted against the byte-bounded cache. Silent, because the returned value is correct either way. Only datasets carrying legacy vector indices are affected;infer_missing_vector_detailsreturns early otherwise.Testing
Asserted by reading the cache back, not by calling
load_indicestwice: inference runs on every call and is deterministic, so a second call returns inferred details whichever handle was written. Non-vacuous — restoring the partitioned handle fails withthe cached list still has empty details, so the inferred list was written to a handle that no reader reads.No Rust CI runs on this branch:
rust.ymltriggers onrelease/**, whichrelease-8.0.0does not match. Verified locally —cargo fmt --all -- --checkandcargo clippy --all --tests --benches -- -D warningsclean,cargo test -p lance2059 passed.Backport
Of
455d1278bfrom #59 (release-10.0.0). Adapted: this base'sIndexMetadataKeyhas nostore_identityfield, so the test's key literal carries onlyversion.🤖 Generated with Claude Code