bziobrowski commented on code in PR #14226:
URL: https://github.com/apache/pinot/pull/14226#discussion_r1808344347


##########
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:
   This follows style of existing code, e.g. 
MultiStageBrokerRequestHandler:216. 
   String + would be equally bad and StringBuilder not that much better to be 
honest. 



-- 
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

Reply via email to