shounakmk219 commented on code in PR #13544: URL: https://github.com/apache/pinot/pull/13544#discussion_r1697949697
########## pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java: ########## @@ -458,6 +458,14 @@ protected BrokerResponse handleRequest(long requestId, String query, @Nullable S } // Validate QPS quota + String database = DatabaseUtils.extractDatabaseFromFullyQualifiedTableName(tableName); + if (!_queryQuotaManager.acquireDatabase(database)) { + String errorMessage = + String.format("Request %d: %s exceeds query quota for database: %s", requestId, query, database); + LOGGER.info(errorMessage); + requestContext.setErrorCode(QueryException.TOO_MANY_REQUESTS_ERROR_CODE); + return new BrokerResponseNative(QueryException.getException(QueryException.QUOTA_EXCEEDED_ERROR, errorMessage)); Review Comment: We have the details on which quota exceed in the error message. Let me know if you still think its better to have a separate error code and I can add one. -- 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