siddharthteotia commented on code in PR #14806:
URL: https://github.com/apache/pinot/pull/14806#discussion_r1916042665
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java:
##########
@@ -277,8 +286,12 @@ protected BrokerResponse handleRequest(long requestId,
String query, SqlNodeAndO
BrokerResponseNativeV2 brokerResponse = new BrokerResponseNativeV2();
brokerResponse.setResultTable(queryResults.getResultTable());
brokerResponse.setTablesQueried(tableNames);
- // TODO: Add servers queried/responded stats
brokerResponse.setBrokerReduceTimeMs(queryResults.getBrokerReduceTimeMs());
+ // MSE cannot finish if a single queried server did not respond, so we
can use the same count for
+ // both the queried and responded stats. Minus one prevents the broker
to be included in the count
+ // (it will always be included because of the root of the query plan)
+ brokerResponse.setNumServersQueried(servers.size() - 1);
+ brokerResponse.setNumServersResponded(servers.size() - 1);
Review Comment:
Is this the happy path ?
If something broke, the count will be different and we still want the
correct metric to be emitted. So I am not sure why are we explicitly setting
them to be same. They should be set agnostic of whether happy or alternate path
was taken
--
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]