Skip to content

Test: Disable hnsw brute force env#1

Open
nathanwilk7 wants to merge 6 commits into
mainfrom
nathan/disable-hnsw-brute-force-env
Open

Test: Disable hnsw brute force env#1
nathanwilk7 wants to merge 6 commits into
mainfrom
nathan/disable-hnsw-brute-force-env

Conversation

@nathanwilk7

Copy link
Copy Markdown
Collaborator

Closes #

💸 TL;DR

📜 Details

Design Doc

Adds process-level env var KNOWHERE_DISABLE_HNSW_BRUTE_FORCE to disable sealed HNSW
IndexBruteForceWrapper paths on query nodes:

  • upfront BF for selective filters / large topk
  • post-HNSW fallback when graph search returns too few results

Allow rolling out BF disable on search-posts-1 querynodes via pod env without
rebuilding per-query search params.

Jira

🧪 Testing Steps / Validation

  • Build knowhere / Milvus image with this branch
  • Deploy with KNOWHERE_DISABLE_HNSW_BRUTE_FORCE=true on search-posts-1 shadow reads querynodes only

✅ Checks

  • CI tests (if present) are passing
  • Adheres to code style for repo
  • Contributor License Agreement (CLA) completed if not a Reddit employee

jamesgao-jpg and others added 6 commits March 26, 2026 15:51
…ch#1541)

* fix: wheel build fails silently when setup.py crashes

Root cause: setup_requires=["numpy", "setuptools_scm"] triggers the
deprecated fetch_build_eggs() on every build, making network calls to
PyPI. When the fetch fails in CI (flaky K8s pod networking), setup.py
crashes before SWIG compilation starts. The failure is then masked by
bash's `local var=$(cmd)` pattern (SC2155), which always returns exit
code 0 regardless of the command's exit code. This causes the script
to continue with an empty wheel path, passing "" to auditwheel which
converts Path("") to PosixPath(".") and errors with "cannot access ..
No such file".

Changes:
- Remove unused setuptools_scm from setup_requires (use_scm_version
  is commented out) and drop setup_requires entirely since numpy is
  pre-installed by install_deps.sh
- Split `local` declarations from command substitution assignments so
  set -e can catch failures (SC2155)
- Redirect auditwheel output to stderr only, preventing error text
  from leaking into captured variables via tee
- Add numpy import check in build script for early failure

Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>

* fix: update PVC claimName to db-data-pvc-ci-cluster

Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>

---------

Signed-off-by: jamesgao-jpg <james.gao@zilliz.com>
Signed-off-by: chasingegg <chao.gao@zilliz.com>

Revert "upgrade index version to 10 (zilliztech#1494)"

This reverts commit 25ce6b5.
…arch (zilliztech#1536)

Previously, RangeSearch always delegated to the iterator-based path when
is_ann_iterator_supported() returned true (all common data types). This
bypassed WhetherPerformBruteForceRangeSearch(), making the brute-force
fallback dead code. At high filter ratios (>=97%), the iterator visits
too many filtered-out graph nodes, causing severe performance degradation
(18 QPS vs 3166 QPS with the fix on cohere 1M dataset at 99% filtering).

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
* [2.6] make 2.6 branch compile with cardinal

Signed-off-by: chasingegg <chao.gao@zilliz.com>

* update

Signed-off-by: chasingegg <chao.gao@zilliz.com>

---------

Signed-off-by: chasingegg <chao.gao@zilliz.com>
Co-authored-by: foxspy <xianliang.li@zilliz.com>
When all L2 distances overflow to infinity (e.g. max-float vectors),
the loop in exhaustive_L2sqr_nearest_imp never updates nearest_idx,
returning 0 instead of -1 (no valid result).

Backport of zilliztech#1533 to 2.6.

Signed-off-by: CLiQing <2208529306@qq.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…aths

Query nodes can set KNOWHERE_DISABLE_HNSW_BRUTE_FORCE to skip upfront and
fallback IndexBruteForceWrapper usage on sealed HNSW segments without
per-query config changes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants