[Vector Upsert 2/5] Harden vector search metric recording and backend param cleanup - #19298
Open
xiangfu0 wants to merge 2 commits into
Open
[Vector Upsert 2/5] Harden vector search metric recording and backend param cleanup#19298xiangfu0 wants to merge 2 commits into
xiangfu0 wants to merge 2 commits into
Conversation
This was referenced Aug 19, 2026
[Vector Upsert 4/5] Apply the query's visible-document set before vector candidate generation
#19300
Open
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #19298 +/- ##
============================================
+ Coverage 67.20% 67.21% +0.01%
Complexity 1424 1424
============================================
Files 3462 3463 +1
Lines 220361 220394 +33
Branches 35147 35158 +11
============================================
+ Hits 148087 148134 +47
+ Misses 60467 60448 -19
- Partials 11807 11812 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
xiangfu0
force-pushed
the
xiangfu0/upsert-vector-2-backend-param-cleanup
branch
2 times, most recently
from
August 19, 2026 01:39
8abc05f to
5796c1c
Compare
…r scan Extract a shared computeExactMatches helper that unifies the exact top-K and threshold scan paths and can restrict scoring to an allowed-document bitmap. Introduce VectorCandidateScope, an immutable set of document IDs a vector predicate is allowed to consider as candidates. Vector top-K is not monotonic, so unlike an ordinary predicate -- which is correct to intersect with the result afterwards -- a document set that defines what the query may see has to be applied before candidate generation. The type carries that contract and says nothing about where the restriction came from; callers decide that. ExactVectorScanFilterOperator accepts one via a new constructor overload, and no production caller passes one yet. Also let the operator record its own exact-scan search and fallback metrics, which were previously invisible to VectorSearchMetrics, and report the applied candidate-filter cardinality in explain output. Add filtered-reader coverage for HnswVectorIndexReader.
… param cleanup Only record a vector search metric when a search actually executed, and guarantee backend search parameters are cleared even when configuration fails partway or the explain-context refresh throws. Previously a failure inside configureBackendParams still recorded a search that never ran, and an exception from refreshExplainContext could skip clearBackendParams entirely.
xiangfu0
force-pushed
the
xiangfu0/upsert-vector-2-backend-param-cleanup
branch
from
August 20, 2026 09:10
5796c1c to
0e2f053
Compare
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.
Part 2/5 of the split of #19287 (Fix FULL-upsert vector candidate generation).
Summary
Two robustness fixes in
VectorSimilarityFilterOperator.executeSearch:failure inside
configureBackendParamsstill recorded a search that never ran.through the setters or the explain-context refresh throws, by claiming cleanup before
the first setter and clearing in a nested finally. Backend search parameters
(
nprobe,efSearch) are ThreadLocal overrides on shared per-segment readers, so askipped cleanup leaks a stale override onto a pooled query thread where it silently
applies to a later query's search.
Part 4/5 relies on this hardening for its early-return exact-scan path.
Validation
VectorSimilarityFilterOperatorTest: 23 tests passed, including the newtestBackendParamsAreClearedWhenConfigurationFailsPartway.Stack