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_r406236190
########## File path: fe/src/main/java/org/apache/doris/catalog/Catalog.java ########## @@ -2781,16 +2782,25 @@ public void alterDatabaseQuota(AlterDatabaseQuotaStmt stmt) throws DdlException ErrorReport.reportDdlException(ErrorCode.ERR_BAD_DB_ERROR, dbName); } - db.setDataQuotaWithLock(stmt.getQuota()); - - DatabaseInfo dbInfo = new DatabaseInfo(dbName, "", db.getDataQuota()); + QuotaType quotaType = stmt.getQuotaType(); + if (quotaType == QuotaType.DATA) { + db.setDataQuotaWithLock(stmt.getQuota()); + } else if (quotaType == QuotaType.REPLICA) { + db.setReplicaQuotaWithLock(stmt.getQuota()); + } + long quota = (quotaType == QuotaType.DATA ? db.getDataQuota() : db.getReplicaQuota()); Review comment: ```suggestion long quota = stmt.getQuota(); ``` ---------------------------------------------------------------- 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