timothy-e opened a new pull request, #18289:
URL: https://github.com/apache/pinot/pull/18289

   Records per-server in-flight request counts for MSE queries so that 
`NumInFlightReqSelector` and `HybridSelector` can start to factor in MSE load.
   
   - `MultiStageBrokerRequestHandler`: accept optional 
`ServerRoutingStatsManager` via new constructor overload; pass through to 
`QueryDispatcher`
   - `BaseBrokerStarter`: pass `_serverRoutingStatsManager` to the handler
   - `QueryDispatcher.submitAndReduce`: when `statsManager` is present, call 
`recordStatsForQuerySubmission` for each dispatched server after `submit()`, 
and decrement inflight for all servers in the finally block via 
`recordStatsUponResponseArrival(..., -1)`
   
   Latency (`recordStatsUponResponseArrival` with real values) and per-sender 
arrival granularity are left to a follow-up PR once per-sender EOS interception 
is in place (see TODO in submitAndReduce). Supplying `-1` for latency will 
[ignore the latency 
value](https://github.com/apache/pinot/blob/master/pinot-core/src/main/java/org/apache/pinot/core/transport/server/routing/stats/ServerRoutingStatsManager.java#L205-L207).
 
   
   Submit could fail part way through so we never get to the incrementing. To 
handle this, we either have to:
   * split up calculating the server list from the actual dispatch.
   * send the stats manager (or a hook) into the dispatch
   * **be okay with sometimes under-reporting the number of inflight ops for a 
few servers.** This approach is the simplest. Under-reporting is unlikely to 
result in a systemic bias towards a set of servers, and the stats are only used 
for adaptive routing.
   


-- 
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]

Reply via email to