test: fix flaky bfloat16 pagination test by pinning DISKANN search_list_size#49033
Open
yanliang567 wants to merge 1 commit intomilvus-io:masterfrom
Open
test: fix flaky bfloat16 pagination test by pinning DISKANN search_list_size#49033yanliang567 wants to merge 1 commit intomilvus-io:masterfrom
yanliang567 wants to merge 1 commit intomilvus-io:masterfrom
Conversation
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yanliang567 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributor
|
[ci-v2-notice] To rerun ci-v2 checks, comment with:
If you have any questions or requests, please contact @zhikunyao. |
…st_size Without an explicit search_list_size, DISKANN adjusts its graph traversal depth proportionally to the internal queryTopK (= limit + offset). This caused paginated searches and the full reference search to explore different candidate neighbourhoods: page 1 (offset=100, limit=100) → internal topk = 200 (shallow) page 3 (offset=300, limit=100) → internal topk = 400 (medium) full search (limit=1000) → internal topk = 1000 (deep) Boundary candidates at the edge of each page differ between the two calls, producing 76-79% overlap and flaky failures against the 80% threshold (40% failure rate in local reproduction). Fix: pin search_list_size=1200 on both paginated and full searches so that both explore the same DISKANN candidate pool regardless of topk. With the same exploration depth, per-page overlap consistently exceeds 90% and overall recall across all pages exceeds 95%. Additional improvements: - Per-page overlap threshold raised from 80% to 90% - Added overall recall assertion (>=95%) to validate cross-page coverage - Expanded docstring explaining the DISKANN pagination consistency model issue: milvus-io#49030 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: yanliang567 <82361606+yanliang567@users.noreply.github.com>
6d7bf91 to
8fbf27f
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.
Summary
Fixes a flaky test in
test_search_bfloat16_with_pagination_defaultthat failed at ~40% rate (2/5 runs locally), with overlaps of 76–79% against the 80% threshold.issue: #49030
Root Cause
When
offsetis set, Milvus proxy computesqueryTopK = limit + offsetand passes it directly to DISKANN as the search depth. Without an explicitsearch_list_size, DISKANN scales its graph traversal proportionally toqueryTopK:Boundary candidates at the edge of each page differ between the paginated and full searches, producing ~76–79% overlap and flaky failures.
Fix
Pin
search_list_size=1200on both paginated and full searches. DISKANN uses this as a fixed exploration budget regardless oftopk, so both calls examine the same candidate pool and agree on boundary positions.Additional improvements:
Test Plan
search_list_sizemaster-20260413on standalone instance🤖 Generated with Claude Code