[Bug][UpdateDataQuota] Skip update used data quota for information_schema db and fix bug for wrong time interval for UpdateDbUsedDataQuotaDaemon (#4175)
This PR is to skip update used data quota for information_schema db, and fix bug for wrong time interval for UpdateDbUsedDataQuotaDaemon.
This commit is contained in:
@ -31,7 +31,7 @@ public class UpdateDbUsedDataQuotaDaemon extends MasterDaemon {
|
||||
private static final Logger LOG = LogManager.getLogger(UpdateDbUsedDataQuotaDaemon.class);
|
||||
|
||||
public UpdateDbUsedDataQuotaDaemon() {
|
||||
super("UPDATE_DB_USED_QUOTA", Config.db_used_data_quota_update_interval_secs);
|
||||
super("UpdateDbUsedDataQuota", Config.db_used_data_quota_update_interval_secs * 1000);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -49,6 +49,9 @@ public class UpdateDbUsedDataQuotaDaemon extends MasterDaemon {
|
||||
LOG.warn("Database [" + dbId + "] doese not exist, skip to update database used data quota");
|
||||
continue;
|
||||
}
|
||||
if (db.isInfoSchemaDb()) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
long usedDataQuotaBytes = db.getUsedDataQuotaWithLock();
|
||||
globalTransactionMgr.updateDatabaseUsedQuotaData(dbId, usedDataQuotaBytes);
|
||||
@ -56,7 +59,7 @@ public class UpdateDbUsedDataQuotaDaemon extends MasterDaemon {
|
||||
LOG.debug("Update database[{}] used data quota bytes : {}.", db.getFullName(), usedDataQuotaBytes);
|
||||
}
|
||||
} catch (AnalysisException e) {
|
||||
LOG.warn("Update database[" + dbId + "] used data quota failed", e);
|
||||
LOG.warn("Update database[" + db.getFullName() + "] used data quota failed", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user