rmdmattingly commented on code in PR #6451:
URL: https://github.com/apache/hbase/pull/6451#discussion_r1834528801


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaCache.java:
##########
@@ -395,21 +429,40 @@ private <K, V extends QuotaState> void fetch(final String 
type,
      * over table quota, use [1 / TotalTableRegionNum * MachineTableRegionNum] 
as machine factor.
      */
     private void updateQuotaFactors() {
-      // Update machine quota factor
-      ClusterMetrics clusterMetrics;
-      try {
-        clusterMetrics = rsServices.getConnection().getAdmin()
-          .getClusterMetrics(EnumSet.of(Option.SERVERS_NAME, 
Option.TABLE_TO_REGIONS_COUNT));
-      } catch (IOException e) {
-        LOG.warn("Failed to get cluster metrics needed for updating quotas", 
e);
-        return;
+      boolean hasTableQuotas = !tableQuotaCache.entrySet().isEmpty()

Review Comment:
   I think it's okay — the two conditions are definitely independent of each 
other, and the implication of that case would be that your tableQuotaCache 
addition missed the boat for this refresh and will be reflected in subsequent 
refreshes



-- 
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: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to