[fix](ann-index) Fix ivf pq recall zero.#63757
Draft
kaka11chen wants to merge 2 commits into
Draft
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
### What problem does this PR solve? Issue Number: close #xxx Related PR: apache#63757 Problem Summary: ANN index building previously used a prefix-only training sample and spooled every vector through the common writer path after delaying FAISS add until finish. That made non-training indexes pay unnecessary spool overhead, and very large segments could still train from a large prefix sample that was less representative than a sample across the segment. This change lets indexes that do not require training add vectors directly, keeps train-required small segments in memory, spills full vectors only after the in-memory chunk threshold, and replaces prefix training data with a bounded reservoir sample. A new ann_index_build_max_train_rows config caps training sample size while still keeping at least the FAISS-required minimum training rows. IVF_ON_DISK is also treated as train-required when computing minimum training rows. ### Release note None ### Check List (For Author) - Test: Manual test - Passed: git diff --check - Attempted: build-support/clang-format.sh on changed C++ files, blocked because clang-format is not installed in this environment - Attempted: DORIS_TOOLCHAIN=gcc ./run-be-ut.sh --run --filter=AnnIndexWriterTest.* -j 8, blocked by unrelated existing GCC compile error in be/src/format/parquet/parquet_column_convert.h:596: std::powf is not a member of std - Behavior changed: Yes (ANN build training sampling and spool behavior changed internally) - Does this need documentation: No
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.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)