[bug] Build cache_memory buffer on the streaming engine to avoid in-memory deadlock #81
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.33) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 156 lines diff across 1 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.303
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #81"
general
weight: 0.35
timkpaine
Description
cache_memorybuilds its buffer with a nestedcollect()inside theregister_io_sourcegenerator. On the in-memory engine that build can deadlock when the cache is read from several branches and another branch runs its own nestedcollect()(for examplepushdown_combine): a Rayon worker waiting on the build work-steals the other collect's job, whose leaf is aPythonScanExecon the same cache, and the build never resumes. The query then hangs underPOLARS_ENGINE_AFFINITY=in-memory.Collecting the build on the streaming engine avoids this. Gated at Polars >= 1.26, where the streaming engine runs io_source sources; below that it falls back to the in-memory
collect()and the deadlock remains.No regression test is included: reliably reproducing the deadlock needs a slow, probabilistic multi-thread subprocess loop whose cost and flakiness outweigh its value as a sentinel. Existing tests in
test_lazy_cache_memory.pycover build-once and correctness.Type of Change
Checklist