You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ta...@apache.org on 2023/07/10 15:40:20 UTC
[iotdb] branch rel/1.1 updated: [To rel/1.2] Fix npe exception when invalid in metric module (#10444) (#10493)
This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a commit to branch rel/1.1
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/1.1 by this push:
new 697eb992205 [To rel/1.2] Fix npe exception when invalid in metric module (#10444) (#10493)
697eb992205 is described below
commit 697eb992205d63146aa27578aa55b961e7fc6f6b
Author: Potato <ta...@apache.org>
AuthorDate: Mon Jul 10 23:40:13 2023 +0800
[To rel/1.2] Fix npe exception when invalid in metric module (#10444) (#10493)
Co-authored-by: ZhangHongYin <46...@users.noreply.github.com>
---
.../src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java b/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java
index e077598ba30..1273605c8d4 100644
--- a/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java
+++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java
@@ -446,10 +446,10 @@ public abstract class AbstractMetricManager {
if (!isEnableMetricInGivenLevel(metricLevel)) {
return true;
}
- if (!nameToMetaInfo.containsKey(name)) {
+ MetricInfo.MetaInfo metaInfo = nameToMetaInfo.get(name);
+ if (metaInfo == null) {
return false;
}
- MetricInfo.MetaInfo metaInfo = nameToMetaInfo.get(name);
return !metaInfo.hasSameKey(tags);
}