stalary commented on code in PR #10471: URL: https://github.com/apache/doris/pull/10471#discussion_r910555030
########## fe/fe-core/src/main/java/org/apache/doris/common/proc/DbsProcDir.java: ########## @@ -90,33 +88,31 @@ public ProcResult fetchResult() throws AnalysisException { } // get info - List<List<Comparable>> dbInfos = new ArrayList<List<Comparable>>(); + List<List<Comparable>> dbInfos = new ArrayList<>(); for (String dbName : dbNames) { DatabaseIf db = catalog.getInternalDataSource().getDbNullable(dbName); if (db == null) { continue; } - List<Comparable> dbInfo = new ArrayList<Comparable>(); + List<Comparable> dbInfo = new ArrayList<>(); db.readLock(); try { int tableNum = db.getTables().size(); dbInfo.add(db.getId()); dbInfo.add(dbName); dbInfo.add(tableNum); - String readableQuota = FeConstants.null_string; - String lastCheckTime = FeConstants.null_string; - long replicaQuota = 0; - if (db instanceof Database) { - long dataQuota = ((Database) db).getDataQuota(); - Pair<Double, String> quotaUnitPair = DebugUtil.getByteUint(dataQuota); - readableQuota = - DebugUtil.DECIMAL_FORMAT_SCALE_3.format(quotaUnitPair.first) + " " + quotaUnitPair.second; - lastCheckTime = TimeUtils.longToTimeString(((Database) db).getLastCheckTime()); - replicaQuota = ((Database) db).getReplicaQuota(); - } + long usedDataQuota = ((Database) db).getUsedDataQuotaWithLock(); Review Comment: Ok, no problem~ -- 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...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org