This is an automated email from the ASF dual-hosted git repository.

domgarguilo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/main by this push:
     new 35189b2aa8 Fix metric merge errors (#4928)
35189b2aa8 is described below

commit 35189b2aa82b47c101aabad10f6050346484b935
Author: Dom G. <domgargu...@apache.org>
AuthorDate: Fri Sep 27 15:48:26 2024 -0400

    Fix metric merge errors (#4928)
    
    * There were metrics defined that nothing produced and the test was
    looking for them.  Removed the definitions.
    
    * Fix metric counter map initialization
    
    ---------
    
    Co-authored-by: Keith Turner <ktur...@apache.org>
---
 core/src/main/java/org/apache/accumulo/core/metrics/Metric.java     | 6 ------
 .../java/org/apache/accumulo/manager/metrics/fate/FateMetrics.java  | 4 ++++
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/core/src/main/java/org/apache/accumulo/core/metrics/Metric.java 
b/core/src/main/java/org/apache/accumulo/core/metrics/Metric.java
index d9f3791964..f096b96a94 100644
--- a/core/src/main/java/org/apache/accumulo/core/metrics/Metric.java
+++ b/core/src/main/java/org/apache/accumulo/core/metrics/Metric.java
@@ -104,12 +104,6 @@ public enum Metric {
       MetricCategory.TABLET_SERVER),
   TSERVER_MEM_ENTRIES("accumulo.tserver.entries.mem", MetricType.GAUGE,
       "Number of entries in memory.", MetricCategory.TABLET_SERVER),
-  TSERVER_MAJC_RUNNING("accumulo.tserver.majc.running", MetricType.GAUGE,
-      "Number of active major compactions.", MetricCategory.TABLET_SERVER),
-  TSERVER_MAJC_STUCK("accumulo.tserver.majc.stuck", MetricType.GAUGE,
-      "Number and duration of stuck major compactions.", 
MetricCategory.TABLET_SERVER),
-  TSERVER_MAJC_QUEUED("accumulo.tserver.majc.queued", MetricType.GAUGE,
-      "Number of queued major compactions.", MetricCategory.TABLET_SERVER),
   TSERVER_MINC_QUEUED("accumulo.tserver.minc.queued", MetricType.GAUGE,
       "Number of queued minor compactions.", MetricCategory.TABLET_SERVER),
   TSERVER_MINC_RUNNING("accumulo.tserver.minc.running", MetricType.GAUGE,
diff --git 
a/server/manager/src/main/java/org/apache/accumulo/manager/metrics/fate/FateMetrics.java
 
b/server/manager/src/main/java/org/apache/accumulo/manager/metrics/fate/FateMetrics.java
index c04513f9fe..200b3ff2b4 100644
--- 
a/server/manager/src/main/java/org/apache/accumulo/manager/metrics/fate/FateMetrics.java
+++ 
b/server/manager/src/main/java/org/apache/accumulo/manager/metrics/fate/FateMetrics.java
@@ -63,6 +63,10 @@ public abstract class FateMetrics<T extends 
FateMetricValues> implements Metrics
     this.context = context;
     this.refreshDelay = Math.max(DEFAULT_MIN_REFRESH_DELAY, 
minimumRefreshDelay);
     this.fateStore = Objects.requireNonNull(buildStore(context));
+
+    for (TStatus status : TStatus.values()) {
+      txStatusCounters.put(status, new AtomicLong(0));
+    }
   }
 
   protected abstract ReadOnlyFateStore<FateMetrics<T>> 
buildStore(ServerContext context);

Reply via email to