Keep shared objects off the per-neighbor search path #833
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.36) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 199 lines diff across 2 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.317
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #833"
general
weight: 0.35
MarkWolters
With several searchers running at once, some JVMs ran graph search 13–22% slower for their whole lifetime. The cause is false sharing. For every scored neighbor,
GraphSearcherread shared objects (Bits.ALLand the no-op score tracker) and wrote its ownvisitedCount. After heap compaction, one worker's searcher could end up on the same cache line as a shared object. Its writes then kept pulling that line away from the other cores.searchOneLayernow checks once per layer whether the filter accepts everything and whether the tracker is the no-op one, so the per-neighbor path no longer touches shared objects. Visits are counted in the per-layer processor and added tovisitedCountonce per layer. Results and visit counts are unchanged.Results
Setup:
| | Mean QPS | JVMs in slow mode | Mean QPS, other JVMs |
|---|---|---|---|
| Before | 112.0k | 4 of 16 (90.6k–101.6k) | 116.6k |
| After | 115.4k | 0 of 16 | 115.8k |
Every JVM visited the same number of nodes per query (508.3).
The slow mode is intermittent and appears less often on current
main. These runs therefore compare commit 8863c5aa with and without the change, where it shows up more readily. Among JVMs that did not go slow, the change was about 0.7% lower, which is close to the noise.Tests:
jvector-testspasses on Ice Lake (8 cores), 131 tests.