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
Fixes a local query edge case where query(where=...) could fail with Error finding id ... when a metadata-filtered candidate exists in metadata/WAL state but is missing from the HNSW reader/index mapping after cache reload.
Skips IdNotFound candidates only in the metadata-filtered local KNN path.
Preserves unfiltered and id-only query behavior.
Returns an empty KNN result when all filtered candidates are missing from HNSW.
Adds a regression test for the cache-reload/missing-candidate case.
Fix local filtered KNN queries when metadata candidates are missing in HNSW mapping
This PR fixes a local query edge case in rust/frontend/src/executor/local.rs where query(where=...) could fail with an IdNotFound-style error if metadata-filtered IDs exist in metadata/WAL but are missing from the HNSW reader mapping (for example after cache reload/reset). The knn path now conditionally tolerates missing HNSW IDs only for metadata-filtered execution, while preserving prior behavior for unfiltered and ID-only queries.
The change introduces a skip_missing_hnsw_ids control flag tied to filter mode, updates offset-ID resolution to skip only LocalHnswSegmentReaderError::IdNotFound in that scoped path, and returns an empty KNN result when all filtered candidates are skipped. A targeted regression test reproduces the cache-reload scenario and validates non-error empty-result behavior.
This summary was automatically generated by @propel-code-bot
The reason will be displayed to describe this comment to others. Learn more.
Review found no issues; the edge-case handling and regression coverage appear sound.
Status: No Issues Found | Risk: Low
Review Details
📁 1 files reviewed | 💬 0 comments
Instruction Files
├── AGENTS.md
└── CLAUDE.md
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
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.
Description of changes
Improvements & Bug fixes
query(where=...)could fail withError finding id ...when a metadata-filtered candidate exists in metadata/WAL state but is missing from the HNSW reader/index mapping after cache reload.IdNotFoundcandidates only in the metadata-filtered local KNN path.New functionality
Fixes #7032.
Test plan
pytestfor python,yarn testfor js,cargo testfor rustTested with: