Repository navigation
fix(index): avoid fragment reuse cache deadlock - #8620
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
The loader now reuses the immutable fragment-reuse metadata selected before entering the single-flight cache, which removes the same-key re-entry while preserving cache identity and load behavior. The zero-capacity regression directly covers the eviction fallback.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Xuanwo
approved these changes
Aug 18, 2026
amunra
added a commit
to rerun-io/lance
that referenced
this pull request
Aug 27, 2026
) ## Summary - use the fragment-reuse metadata already loaded before entering the cache loader - prevent the loader from recursively probing its own single-flight cache key - add a zero-capacity Moka cache regression test for the eviction fallback ## Root cause `open_frag_reuse_index` loaded the matching metadata, then its cache-miss loader called `load_index` for the same UUID. `load_index` delegates to `load_indices`, which probes the same fragment-reuse cache key. Under eviction pressure, the single-flight leader therefore waited on its own in-flight load indefinitely. ## Validation - `cargo test -p lance test_open_frag_reuse_index_with_zero_capacity_cache -- --nocapture` - `cargo test -p lance test_load_indices -- --nocapture` - `cargo fmt --all` - `cargo clippy --all --tests --benches -- -D warnings` Fixes lance-format#8619 <!-- lance-gatekeeper-fix:v1 agent=04eb7f91260e98b8eaa60312dbe80b06 generation=1 --> (cherry picked from commit ff4584f) Co-authored-by: lance-gatefixer[bot] <312823363+lance-gatefixer[bot]@users.noreply.github.com>
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.
Summary
Root cause
open_frag_reuse_indexloaded the matching metadata, then its cache-miss loader calledload_indexfor the same UUID.load_indexdelegates toload_indices, which probes the same fragment-reuse cache key. Under eviction pressure, the single-flight leader therefore waited on its own in-flight load indefinitely.Validation
cargo test -p lance test_open_frag_reuse_index_with_zero_capacity_cache -- --nocapturecargo test -p lance test_load_indices -- --nocapturecargo fmt --allcargo clippy --all --tests --benches -- -D warningsFixes #8619