xiangfu0 commented on code in PR #19838:
URL: https://github.com/apache/pinot/pull/19838#discussion_r4291038279


##########
pinot-broker/src/main/java/org/apache/pinot/broker/queryquota/HelixExternalViewBasedQueryQuotaManager.java:
##########
@@ -235,13 +239,43 @@ private QuotaConfig 
getQuotaConfigFromPropertyStore(String tableNameWithType) {
     return tableConfig.getQuotaConfig();
   }
 
+  @Override
+  public QuotaEnforcementMode getQueryQuotaEnforcementMode(String tableName) {
+    List<String> entityNames = 
TableNameBuilder.getTableTypeFromTableName(tableName) != null ? 
List.of(tableName)
+        : List.of(tableName, 
TableNameBuilder.OFFLINE.tableNameWithType(tableName),
+            TableNameBuilder.REALTIME.tableNameWithType(tableName));
+    QuotaEnforcementMode result = null;
+    for (String entityName : entityNames) {
+      // Entries without a QPS quota have a null rate limiter but are still 
listed, so their mode is included here. This
+      // is safe because the mode is only consulted after acquire() reported a 
breach, which such a table cannot cause.

Review Comment:
   Thanks for adding this — it captures exactly the subtlety I raised last 
time. The reasoning is correct: such a table is in the map but cannot breach, 
so including its mode here never changes the strictest-mode result. Resolved 
from my side.



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