morningman commented on a change in pull request #3283: Support setting replica 
quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406238734
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/Database.java
 ##########
 @@ -232,7 +250,34 @@ public long getDataQuotaLeftWithLock() {
         }
     }
 
-    public void checkQuota() throws DdlException {
+
+    public long getReplicaQuotaLeftWithLock() {
+        long usedReplicaQuota = 0;
+        readLock();
+        try {
+            for (Table table : this.idToTable.values()) {
+                if (table.getType() != TableType.OLAP) {
+                    continue;
+                }
+
+                OlapTable olapTable = (OlapTable) table;
 
 Review comment:
   Why not just using `table.getReplicaCount()`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to