From 0aa3654802fa8fd7da27c80619248b92b3ac6af5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20H=C3=B8ydahl?= Date: Fri, 23 Aug 2019 15:23:58 +0200 Subject: [PATCH] SOLR-13702: Some components register twice their metric names (#834) --- solr/CHANGES.txt | 2 ++ .../src/java/org/apache/solr/security/AuditLoggerPlugin.java | 1 - .../src/java/org/apache/solr/security/AuthenticationPlugin.java | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index a26a2e350e0..7fef7681a0d 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -131,6 +131,8 @@ Improvements * SOLR-13677: All Metrics Gauges should be unregistered by the objects that registered them (noble) +* SOLR-13702: Some components register twice their metric names (janhoy) + Bug Fixes ---------------------- diff --git a/solr/core/src/java/org/apache/solr/security/AuditLoggerPlugin.java b/solr/core/src/java/org/apache/solr/security/AuditLoggerPlugin.java index 544f822cc86..a6c364acf38 100644 --- a/solr/core/src/java/org/apache/solr/security/AuditLoggerPlugin.java +++ b/solr/core/src/java/org/apache/solr/security/AuditLoggerPlugin.java @@ -257,7 +257,6 @@ public abstract class AuditLoggerPlugin implements Closeable, Runnable, SolrInfo queuedTime = manager.timer(this, registryName, "queuedTime", getCategory().toString(), scope, className); } manager.registerGauge(this, registryName, () -> async, "async", true, "async", getCategory().toString(), scope, className); - metricNames.addAll(Arrays.asList("errors", "logged", "requestTimes", "totalTime", "queueCapacity", "queueSize", "async")); } @Override diff --git a/solr/core/src/java/org/apache/solr/security/AuthenticationPlugin.java b/solr/core/src/java/org/apache/solr/security/AuthenticationPlugin.java index 8044af9f5f7..ca342b0ac56 100644 --- a/solr/core/src/java/org/apache/solr/security/AuthenticationPlugin.java +++ b/solr/core/src/java/org/apache/solr/security/AuthenticationPlugin.java @@ -157,8 +157,6 @@ public abstract class AuthenticationPlugin implements SolrInfoBean, SolrMetricPr numMissingCredentials = this.metrics.counter(this, "failMissingCredentials",getCategory().toString()); requestTimes = this.metrics.timer(this,"requestTimes", getCategory().toString()); totalTime = this.metrics.counter(this,"totalTime", getCategory().toString()); - metricNames.addAll(Arrays.asList("errors", "requests", "authenticated", "passThrough", - "failWrongCredentials", "failMissingCredentials", "requestTimes", "totalTime")); } @Override