fix(native): Release pending HTTP exchange buffers on close #28823
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.45) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 442 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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.365
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #28823"
general
weight: 0.35
mbasmanova
Description
<!---Describe your changes in detail-->
Use weak references in Prestissimo exchange response callbacks so pending requests and queued responses can release the exchange source and its query memory pool. close() releases buffered response data that the driver has yet to claim. Producer DELETE retries continue with independent retry state.
Motivation and Context
<!---Why is this change required? What problem does it solve?-->
<!---If it fixes an open issue, please link to the issue here.-->
After a query closes its exchange, pending HTTP responses and producer cleanup retries can keep the exchange source and its memory pool alive. This PR addresses the Prestissimo side of the shutdown issue. Velox #20083 discussion
Impact
<!---Describe any public API or user-facing feature change or any performance impact-->
Test Plan
<!---Please fill in how you tested your change-->
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.
Summary by Sourcery
Ensure native exchange shutdown releases pending HTTP response resources without retaining query state.
Bug Fixes:
Enhancements:
Tests: