Skip to content

test(vectorindex): skip Recall10k under -race#32

Merged
aksOps merged 1 commit into
mainfrom
fix-hnsw-race-skip
Apr 23, 2026
Merged

test(vectorindex): skip Recall10k under -race#32
aksOps merged 1 commit into
mainfrom
fix-hnsw-race-skip

Conversation

@aksOps

@aksOps aksOps commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary

`TestHNSW_Recall10k` was the integration-CI bottleneck at ~410s (68% of the 10-min job). Workload is 100% sequential — the race detector has nothing to catch and just adds ~10× overhead.

Fix: standard `raceEnabled` build-tagged constant; skip only this test under `-race`. `TestHNSW_ConcurrentAddSearch` still runs under `-race` and covers the actual concurrent path.

Local timings

Command Before After
`go test -run Recall10k` n/a 68s (recall=1.000)
`go test -race -run Recall10k` ~410s 1s (skip)
`go test -race -run ConcurrentAdd` 2s 2s

CI impact

Integration job: ~600s → ~190s (~7 min saved per run).

Test plan

  • Recall10k runs + passes without -race locally
  • Recall10k skips cleanly under -race locally
  • Concurrent test still runs under -race

TestHNSW_Recall10k is the CI bottleneck at ~410s under -race (68% of
the integration job). The workload is fully sequential — build 10k
vectors, then 20 query probes — so the race detector has nothing to
catch and just adds ~10× overhead.

Added a raceEnabled build-tagged constant (standard Go idiom) so the
test skips only under -race. TestHNSW_ConcurrentAddSearch still runs
under -race and covers the actual concurrent code path.

Local timings:
  go test -run Recall10k            68s (recall=1.000)
  go test -race -run Recall10k       1s (skip)
  go test -race -run ConcurrentAdd   2s (unchanged)

Integration CI projected: 600s → ~190s.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aksOps aksOps enabled auto-merge (squash) April 23, 2026 00:31
@aksOps aksOps merged commit d500447 into main Apr 23, 2026
11 checks passed
@aksOps aksOps deleted the fix-hnsw-race-skip branch April 23, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant