bziobrowski commented on code in PR #14226: URL: https://github.com/apache/pinot/pull/14226#discussion_r1808559645
########## pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java: ########## @@ -145,6 +148,16 @@ public BrokerResponse handleRequest(JsonNode request, @Nullable SqlNodeAndOption } } + // check app qps before doing anything + String application = sqlNodeAndOptions.getOptions().get(Broker.Request.QueryOptionKey.APPLICATION_NAME); + if (application != null && !_queryQuotaManager.acquireApplication(application)) { + String errorMessage = + String.format("Request %d: %s exceeds query quota for application: %s", requestId, query, application); Review Comment: I don't like String.format() either but to me it creates garbage of quantity comparable with String concat. I only used it to follow the style of db qps code. I'll change it here but reckon what we ought to do is remove the worse pattern of 'String.format()' from the code base altogether. This way any usage will stick out like a sore thumb. -- 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