yashmayya commented on code in PR #17710:
URL: https://github.com/apache/pinot/pull/17710#discussion_r2813434382
##########
pinot-core/src/main/java/org/apache/pinot/core/query/scheduler/QueryScheduler.java:
##########
@@ -163,20 +163,24 @@ protected byte[]
processQueryAndSerialize(ServerQueryRequest queryRequest, Execu
// TODO: Perform this check sooner during the serialization of DataTable.
Map<String, String> queryOptions =
queryRequest.getQueryContext().getQueryOptions();
Long maxResponseSizeBytes =
QueryOptionsUtils.getMaxServerResponseSizeBytes(queryOptions);
- if (maxResponseSizeBytes != null && responseBytes != null &&
responseBytes.length > maxResponseSizeBytes) {
- String errMsg =
- "Serialized query response size " + responseBytes.length + "
exceeds threshold " + maxResponseSizeBytes
- + " for requestId " + requestId + " from broker " +
queryRequest.getBrokerId();
- LOGGER.error(errMsg);
-
_serverMetrics.addMeteredTableValue(queryRequest.getTableNameWithType(),
- ServerMeter.LARGE_QUERY_RESPONSE_SIZE_EXCEPTIONS, 1);
+ if (maxResponseSizeBytes != null && responseBytes != null) {
+ int responseSizeBytes = responseBytes.length;
+ String tableNameWithType = queryRequest.getTableNameWithType();
+ _serverMetrics.addMeteredTableValue(tableNameWithType,
ServerMeter.QUERY_RESPONSE_SIZE, responseSizeBytes);
+ if (responseSizeBytes > maxResponseSizeBytes) {
Review Comment:
+1, don't we want to record the response size for all queries?
--
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]