GraphSearcher: create the visited marker once per searcher and handle scored neighbors in searchOneLayer #810
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 254 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.332
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #810"
general
weight: 0.35
MarkWolters
Fixes #809.
What
visited::addmarker passed toprocessNeighborsis created once per searcher instead of once per expanded node.processNeighborscalled for each neighbor, so it was fast only when the JIT inlined that callback, which depends on compile order.NodesUnsorted, andsearchOneLayerhandles them in its own loop.No API changes. A TODO on
View.processNeighborsdescribes the longer-term API: views would fill the caller's buffer directly, removing the separate batch buffers.Results
In-memory vectors, exact scoring, colbert 1M (128 dimensions), GNR (48 cores), JVM pinned to 4 cores, 4 threads, beam 40, never-seen queries, 3 fresh JVMs each in rotating order:
| | main QPS | this PR QPS | main p50 | this PR p50 | bytes/query |
|---|---|---|---|---|---|
| JDK 22 | 26,144 / 26,432 / 26,324 | 30,778 / 30,676 / 30,803 (+17%) | 0.149–0.152 ms | 0.128–0.129 ms | 2,151 → 648 |
| JDK 25 | 27,016 / 26,801 / 26,878 | 31,251 / 29,629 / 30,977 (+14%) | 0.147–0.148 ms | 0.127–0.130 ms | 2,151 → 480–880 |
Across 14 1M datasets (25 to 3,072 dimensions) on GNR (48 cores) and Ice Lake (8 cores), JDK 25 and 22, Panama and native: in-memory search is faster, from about +35% at 25 dimensions to level at 3,072; on-disk exact search is level within run-to-run spread.
BenchYAML, ada002-1M (1,536 dimensions), on-disk index with NVQ rerank, Ice Lake (32 cores), JDK 25: search QPS and build time are level for fused ASH (2-bit) and non-fused PQ; recall is unchanged. Search results are identical to main on every path.
Tests
New
TestWideExpansions: a fully connected graph where one expansion scores 299 neighbors, more than the buffer's initial size. jvector-base and jvector-tests pass on JDK 25 and 22.