Skip to content

BVT: vector_hnsw_async.sql HNSW async search returns non-exact Top1 #24849

Closed

Description

@jiangxinmeng1

Summary

BVT failed in test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_async.sql at row 54.

CI job: https://github.com/matrixorigin/matrixone/actions/runs/26940644255/job/79481042655?pr=24844

Failure

SQL:

select * from t2 order by L2_DISTANCE(b, "[0, 16, 35, 5, 32, 31, 14, 10, 11, 78, 55, 10, 45, 83, 11, 6, 14, 57, 102, 75, 20, 8, 3, 5, 67, 17, 19, 26, 5, 0, 1, 22, 60, 26, 7, 1, 18, 22, 84, 53, 85, 119, 119, 4, 24, 18, 7, 7, 1, 81, 106, 102, 72, 30, 6, 0, 9, 1, 9, 119, 72, 1, 4, 33, 119, 29, 6, 1, 0, 1, 14, 52, 119, 30, 3, 0, 0, 55, 92, 111, 2, 5, 4, 9, 22, 89, 96, 14, 1, 0, 1, 82, 59, 16, 20, 5, 25, 14, 11, 4, 0, 0, 1, 26, 47, 23, 4, 0, 0, 4, 38, 83, 30, 14, 9, 4, 9, 17, 23, 41, 0, 0, 2, 8, 19, 25, 23, 1]") ASC LIMIT 1;

Expected first row: a = 0, where the query vector exactly matches the loaded row.

Actual first row: a = 2.

Error excerpt:

ERROR RSRow:58 - The value of [row:0,column:0] does not equal with each other,one is [0],but the other is [2]

Initial Analysis

The query vector is row a=0 in sift128_base_10k.csv.gz, so exact scan should return distance 0 for a=0. The BVT currently asserts exact Top1 through a query shape that can be rewritten to HNSW search. HNSW is approximate, and this async index test also depends on CDC/index sync timing, so asserting an exact Top1 row is unstable.

The likely fix is to make exact-result assertions bypass vector-index rewrite, for example with LIMIT 1 by rank with option 'mode=force', or otherwise adjust the test to validate HNSW async index behavior without requiring exact ANN Top1 recall.

Affected test

test/distributed/cases/pessimistic_transaction/vector/vector_hnsw_async.sql

Activity

  1. cpegeric commented on Jun 5, 2026

    @cpegeric
    Contributor

    this is a known issue in usearch. unum-cloud/USearch#735

    temp fix is set nthread = 1

  2. cpegeric commented on Jun 8, 2026

    @cpegeric
    Contributor

    fixed. please verify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions