jadami10 commented on a change in pull request #7823: URL: https://github.com/apache/pinot/pull/7823#discussion_r756223148
########## File path: pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java ########## @@ -459,7 +459,13 @@ private BrokerResponseNative handleSQLRequest(long requestId, String query, Json if (offlineBrokerRequest == null && realtimeBrokerRequest == null) { LOGGER.info("No server found for request {}: {}", requestId, query); _brokerMetrics.addMeteredTableValue(rawTableName, BrokerMeter.NO_SERVER_FOUND_EXCEPTIONS, 1); - return BrokerResponseNative.EMPTY_RESULT; + BrokerResponseNative brokerResponse = BrokerResponseNative.EMPTY_RESULT; + if (numUnavailableSegments > 0) { Review comment: It's a little tough to do with the way the code is structured. We can't return early when there's segments missing because many use cases still want partial results if possible. And there are several places in this function that short-circuit and return their own response before adding previous exceptions. But I've moved the code up to create a list of exceptions we can add to. And I've added the missing segments exception to the timeout response as well. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org