This is an automated email from the ASF dual-hosted git repository.
lijibing pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 536ca0bfe68 [fix](auditlog)Fix auditlog NPE (#45772) (#45808)
536ca0bfe68 is described below
commit 536ca0bfe688cb4ebc11f9443d18545e500549cf
Author: James <[email protected]>
AuthorDate: Mon Dec 23 21:22:41 2024 +0800
[fix](auditlog)Fix auditlog NPE (#45772) (#45808)
backport: https://github.com/apache/doris/pull/45772
---
fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java | 6 +++---
.../org/apache/doris/statistics/ColumnStatisticsCacheLoader.java | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java
index e73ddd7aa86..e060e198733 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/AuditLogHelper.java
@@ -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);
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/statistics/ColumnStatisticsCacheLoader.java
b/fe/fe-core/src/main/java/org/apache/doris/statistics/ColumnStatisticsCacheLoader.java
index c937b077fc5..4b47817863d 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/statistics/ColumnStatisticsCacheLoader.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/statistics/ColumnStatisticsCacheLoader.java
@@ -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);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]