sarkaramrit1993 opened a new pull request, #5238: URL: https://github.com/apache/solr/pull/5238
[SOLR-11994](https://issues.apache.org/jira/browse/SOLR-11994) # Description First step of [SOLR-18571](https://issues.apache.org/jira/browse/SOLR-18571) (Query Insights). Adds a node-level hook notified when each client search finishes, so a module can track the slowest queries without parsing logs. Nothing changes unless a listener is registered. # Solution - `SearchRequestListener`, registered through `CoreContainer.addSearchRequestListener`, following `SolrCore.addConfListener`. - `SearchHandler.handleRequest` calls it once, on the node that coordinated the search. It passes the request, `ResponseBuilder`, elapsed and CPU time, hits, partial results and any failure. - Not reported: shard sub-requests, `/get`, `/export`, and searches Solr runs internally, such as ping, warming and `[subquery]`. A `/select` a streaming expression sends to a replica is reported on that replica. - A listener `Exception` is logged and doesn't affect the response. An `Error` propagates. # Tests `SearchRequestListenerTest` (2-shard cluster): one event per request, request fields, a 400 failure, a throwing listener, `/get`, `/export`, ping, `[subquery]` and internal searches skipped, forced partial results, v2 `/select`, CPU time, CPU time on a failed distributed search. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
