backport: https://github.com/apache/doris/pull/45772
This commit is contained in:
@ -202,21 +202,21 @@ public class AuditLogHelper {
|
||||
.setCommandType(ctx.getCommand().toString());
|
||||
|
||||
if (ctx.getState().isQuery()) {
|
||||
if (!ctx.getSessionVariable().internalSession) {
|
||||
if (!ctx.getSessionVariable().internalSession && MetricRepo.isInit) {
|
||||
MetricRepo.COUNTER_QUERY_ALL.increase(1L);
|
||||
MetricRepo.USER_COUNTER_QUERY_ALL.getOrAdd(ctx.getQualifiedUser()).increase(1L);
|
||||
}
|
||||
if (ctx.getState().getStateType() == MysqlStateType.ERR
|
||||
&& ctx.getState().getErrType() != QueryState.ErrType.ANALYSIS_ERR) {
|
||||
// err query
|
||||
if (!ctx.getSessionVariable().internalSession) {
|
||||
if (!ctx.getSessionVariable().internalSession && MetricRepo.isInit) {
|
||||
MetricRepo.COUNTER_QUERY_ERR.increase(1L);
|
||||
MetricRepo.USER_COUNTER_QUERY_ERR.getOrAdd(ctx.getQualifiedUser()).increase(1L);
|
||||
}
|
||||
} else if (ctx.getState().getStateType() == MysqlStateType.OK
|
||||
|| ctx.getState().getStateType() == MysqlStateType.EOF) {
|
||||
// ok query
|
||||
if (!ctx.getSessionVariable().internalSession) {
|
||||
if (!ctx.getSessionVariable().internalSession && MetricRepo.isInit) {
|
||||
MetricRepo.HISTO_QUERY_LATENCY.update(elapseMs);
|
||||
MetricRepo.USER_HISTO_QUERY_LATENCY.getOrAdd(ctx.getQualifiedUser()).update(elapseMs);
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ public class ColumnStatisticsCacheLoader extends BasicAsyncCacheLoader<Statistic
|
||||
columnStatistic = table.getColumnStatistic(key.colName);
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
LOG.warn("Failed to load stats for column [Catalog:{}, DB:{}, Table:{}, Column:{}], Reason: {}",
|
||||
LOG.info("Failed to load stats for column [Catalog:{}, DB:{}, Table:{}, Column:{}], Reason: {}",
|
||||
key.catalogId, key.dbId, key.tableId, key.colName, t.getMessage());
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(t);
|
||||
|
||||
Reference in New Issue
Block a user