Repository navigation
test: cover IVF_HNSW_PQ and IVF_HNSW_FLAT in serializing cache prewarm test - #11629
Merged
Merged
Conversation
…m test The HNSW cache codec requested in lance-format#6745 already exists: HNSW partitions serialize through the generic IVF partition codecs with zero-copy Arrow IPC, and the prewarm test asserts no IO for IVF_HNSW_SQ and IVF_HNSW_RQ. Extend that test to the remaining IVF+HNSW variants. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016RQsSsM41S1EV8chjxfTmo
Xuanwo
approved these changes
Nov 29, 2026
BubbleCal
approved these changes
Nov 30, 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.
Closes #6745.
Summary
Most of #6745 had already been done by earlier PRs. This PR adds no new codec or serialization logic. It only extends test coverage to the two IVF+HNSW variants that weren't tested yet.
The issue asked for two things. Both were already on
main:PartitionEntry<S, Q>codecs inrust/lance/src/index/vector/ivf/partition_serde.rs. Those write the sub-index withwrite_ipc(index.to_batch())and read it back throughHNSW::load. Since perf: make HNSW cheaper to load #6798,HNSW::loadkeeps the Arrow batch and serves neighbor lists zero-copy (LoadedHnswGraph).to_batch()hands that batch back unchanged, so a loaded graph round-trips through the cache without being rebuilt.test_prewarm_and_query_with_serializing_backendprewarms throughSerializingCacheBackend, restarts the backend so only serialized entries survive, queries, checks recall, and assertsread_iops == 0. It already covered IVF_HNSW_SQ and IVF_HNSW_RQ.Earlier PRs that did the work:
CacheCodecfor serializing index cache entries #6223:CacheCodecand the IVF partition codecs, which are generic over the sub-indexChanges
Adds
ivf_hnsw_pq(PartitionEntry<HNSW, ProductQuantizer>) andivf_hnsw_flat(PartitionEntry<HNSW, FlatQuantizer>) cases totest_prewarm_and_query_with_serializing_backend. Every IVF+HNSW variant is now covered by the prewarm, restart and no-IO check.Testing
cargo test --profile ci -p lance --lib test_prewarm_and_query_with_serializing_backend: all 5 cases pass (ivf_pq,ivf_hnsw_sq,ivf_hnsw_rq, and the newivf_hnsw_pqandivf_hnsw_flat) in 1.55s.cargo fmt --all -- --check: clean.cargo clippy --profile ci -p lance --tests --benches -- -D warnings: clean. Clippy was run on the touched crate only, not with--all.Generated by Claude Code