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: [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]

Reply via email to