Skip to content
/ server Public

MDEV-38721: refactor hierarchical read traversal into helper#4774

Draft
luvjeetk wants to merge 1 commit intoMariaDB:mainfrom
luvjeetk:mdev-38721-pr1-vf-hnsw
Draft

MDEV-38721: refactor hierarchical read traversal into helper#4774
luvjeetk wants to merge 1 commit intoMariaDB:mainfrom
luvjeetk:mdev-38721-pr1-vf-hnsw

Conversation

@luvjeetk
Copy link

Summary

Preparatory refactor for MDEV-38721 (VF-HNSW).

This change extracts the existing read-path hierarchical traversal from mhnsw_read_first() into a dedicated helper function. Behavior is intended to stay unchanged.

Why

  • Isolate current hierarchical read logic in one place.
  • Make upcoming VF-HNSW traversal work easier to implement and review.

Changes

  • sql/vector_mhnsw.cc
    • Added search_hierarchical_read(...)
    • Replaced duplicated inline read-layer loop in mhnsw_read_first() with helper call

Verification

cmake --build build -j4 --target sql
cd build/mysql-test
./mariadb-test-run.pl main.vector

Local result: pass (aria, innodb, myisam).

@gkodinov gkodinov added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Mar 11, 2026
@vuvova vuvova self-requested a review March 11, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements.

Development

Successfully merging this pull request may close these issues.

2 participants