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

kturner 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 3960ee2f46 Fixes NPE in QueueMetrics (#5020)
3960ee2f46 is described below

commit 3960ee2f460ec6d5d2a8521ee0d53660802748be
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Wed Oct 30 18:16:36 2024 -0400

    Fixes NPE in QueueMetrics (#5020)
---
 .../apache/accumulo/manager/compaction/coordinator/QueueMetrics.java  | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/QueueMetrics.java
 
b/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/QueueMetrics.java
index dd2705eb18..aa429d6999 100644
--- 
a/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/QueueMetrics.java
+++ 
b/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/QueueMetrics.java
@@ -158,6 +158,10 @@ public class QueueMetrics implements MetricsProducer {
     // read the volatile variable once so the rest of the method has 
consistent view
     var localRegistry = meterRegistry;
 
+    if (localRegistry == null) {
+      return;
+    }
+
     if (queueCountMeter == null) {
       queueCountMeter = Gauge
           .builder(COMPACTOR_JOB_PRIORITY_QUEUES.getName(), 
compactionJobQueues,

Reply via email to