SOLR-11994: Add SearchRequestListener hook to SearchHandler #5238
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.40) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 152 lines diff across 1 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.301
Real PR Conversation Timeline
1 comments
"Review active on #5238"
general
weight: 0.35
sarkaramrit1993
SOLR-11994
Description
First step of SOLR-18571 (Query Insights). Adds a node-level hook notified once per client search, on the node that coordinated it, so a module can track slow queries without parsing logs. Nothing changes unless a listener is registered.
Solution
SearchRequestListener, registered throughCoreContainer.getSearchRequestListenerManager().add.captureruns on the request thread once the header has its QTime, and returns what the listener needs, or null to skip.onRequestEndruns later on one daemon thread per node, so slow listener work doesn't add to latency or QTime.SearchRequestInfoholds scalars only.qTimeMsequals the header QTime.solr.search.listener.queue.size, default 1000). When it's full the search is dropped, never blocked, and counted insolr.search.listener.lost./get,/export, ping, warming,[subquery].Tests
SearchRequestListenerTest(2-shard cluster) andSearchRequestListenerManagerTest(full queue, non-blocking offer, listener errors and interrupts, shutdown).