Jackie-Jiang commented on code in PR #12510: URL: https://github.com/apache/pinot/pull/12510#discussion_r1508376156
########## pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java: ########## @@ -1773,17 +1774,23 @@ private void setMaxServerResponseSizeBytes(int numServers, Map<String, String> q } // BrokerConfig - Long maxServerResponseSizeBrokerConfig = - _config.getProperty(Broker.CONFIG_OF_MAX_SERVER_RESPONSE_SIZE_BYTES, Long.class); - if (maxServerResponseSizeBrokerConfig != null) { - queryOptions.put(QueryOptionKey.MAX_SERVER_RESPONSE_SIZE_BYTES, Long.toString(maxServerResponseSizeBrokerConfig)); + String strResponseSize = _config.getProperty(Broker.CONFIG_OF_MAX_SERVER_RESPONSE_SIZE_BYTES); + if (strResponseSize != null) { + Long maxServerResponseSizeBrokerConfig = DataSizeUtils.toBytes(strResponseSize); Review Comment: This method returns primitive `long`, no need to do another null check ########## pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java: ########## @@ -329,12 +329,14 @@ public static class Broker { // Broker config indicating the maximum serialized response size across all servers for a query. This value is // equally divided across all servers processing the query. + // The value can be in human readable format (e.g. '150K', '150KB', '0.15MB') or in bytes (e.g. '150000'). public static final String CONFIG_OF_MAX_QUERY_RESPONSE_SIZE_BYTES = "pinot.broker.max.query.response.size.bytes"; Review Comment: Ideally we want to remove `.bytes` suffix here. Since this feature is not released yet (added after `1.0`), I guess we can change it? cc @vvivekiyer -- 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