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/12/08 00:56:26 UTC
(iotdb) branch master updated: [IOTDB-6259][RatisConsensus] Fix missing prefix in gauge metrics (#11677)
This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 78ce7e74bce [IOTDB-6259][RatisConsensus] Fix missing prefix in gauge metrics (#11677)
78ce7e74bce is described below
commit 78ce7e74bcefedbc44036d22755fa26d787a204a
Author: William Song <48...@users.noreply.github.com>
AuthorDate: Fri Dec 8 08:56:19 2023 +0800
[IOTDB-6259][RatisConsensus] Fix missing prefix in gauge metrics (#11677)
---
.../apache/iotdb/consensus/ratis/metrics/IoTDBMetricRegistry.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/metrics/IoTDBMetricRegistry.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/metrics/IoTDBMetricRegistry.java
index df43be07050..8a1de5eb203 100644
--- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/metrics/IoTDBMetricRegistry.java
+++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/metrics/IoTDBMetricRegistry.java
@@ -145,13 +145,13 @@ public class IoTDBMetricRegistry implements RatisMetricRegistry {
}
@Override
- public <T> void gauge(String fullName, Supplier<Supplier<T>> supplier) {
+ public <T> void gauge(String name, Supplier<Supplier<T>> supplier) {
+ final String fullName = getMetricName(name);
gaugeCache.computeIfAbsent(
fullName,
- name -> {
+ fn -> {
final GaugeProxy<T> gauge = new GaugeProxy<>(supplier);
- metricService.createAutoGauge(
- name, getMetricLevel(name), gauge, GaugeProxy::getDoubleValue);
+ metricService.createAutoGauge(fn, getMetricLevel(fn), gauge, GaugeProxy::getDoubleValue);
return true;
});
}