siddharthteotia commented on code in PR #11710:
URL: https://github.com/apache/pinot/pull/11710#discussion_r1345368538
##########
pinot-core/src/main/java/org/apache/pinot/core/query/scheduler/QueryScheduler.java:
##########
@@ -168,6 +169,23 @@ protected byte[]
processQueryAndSerialize(ServerQueryRequest queryRequest, Execu
byte[] responseBytes = serializeResponse(queryRequest, instanceResponse);
+ Map<String, String> queryOptions =
queryRequest.getQueryContext().getQueryOptions();
+ Long maxResponseSizeBytes =
QueryOptionsUtils.getMaxServerResponseSizeBytes(queryOptions);
+
+ // TODO: Perform this check sooner during the serialization of DataTable.
+ if (maxResponseSizeBytes != null && responseBytes.length >
maxResponseSizeBytes) {
+ String errMsg = String.format("Serialized query response size %d
exceeds threshold for requestId %d from "
Review Comment:
Can we also include the threshold in the error message ? Otherwise whoever
encounters this will have to check the code as well to know the threshold
--
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]