lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [lucene-solr] 01/03: SOLR-14944: Remove the "spins" metrics.
Date Mon, 19 Oct 2020 11:41:50 GMT
This is an automated email from the ASF dual-hosted git repository.

ab pushed a commit to branch jira/solr-14749-cluster-singleton
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 9ab9d208c7272126d76cf72d6a642bb0f97e0c35
Author: Andrzej Bialecki <ab@apache.org>
AuthorDate: Mon Oct 19 11:50:08 2020 +0200

    SOLR-14944: Remove the "spins" metrics.
---
 solr/CHANGES.txt                                             |  3 +++
 solr/core/src/java/org/apache/solr/core/CoreContainer.java   |  4 ----
 solr/core/src/java/org/apache/solr/core/SolrCore.java        |  1 -
 .../org/apache/solr/metrics/SolrMetricsIntegrationTest.java  | 12 ------------
 4 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 6ab0748..06384bd 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -128,6 +128,9 @@ Other Changes
 
 * SOLR-14930: Removed rule based replica placement (noble)
 
+* SOLR-14944: Remove the "spins" metrics - support for detection of spinning disks has been
+  removed in LUCENE-9576. (ab)
+
 Bug Fixes
 ---------------------
 * SOLR-14546: Fix for a relatively hard to hit issue in OverseerTaskProcessor that could
lead to out of order execution
diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
index c341469..9f3f17f 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
@@ -777,16 +777,12 @@ public class CoreContainer {
         true, "usableSpace", SolrInfoBean.Category.CONTAINER.toString(), "fs");
     solrMetricsContext.gauge(() -> dataHome.toString(),
         true, "path", SolrInfoBean.Category.CONTAINER.toString(), "fs");
-    solrMetricsContext.gauge(() -> false,
-        true, "spins", SolrInfoBean.Category.CONTAINER.toString(), "fs");
     solrMetricsContext.gauge(() -> cfg.getCoreRootDirectory().toFile().getTotalSpace(),
         true, "totalSpace", SolrInfoBean.Category.CONTAINER.toString(), "fs", "coreRoot");
     solrMetricsContext.gauge(() -> cfg.getCoreRootDirectory().toFile().getUsableSpace(),
         true, "usableSpace", SolrInfoBean.Category.CONTAINER.toString(), "fs", "coreRoot");
     solrMetricsContext.gauge(() -> cfg.getCoreRootDirectory().toString(),
         true, "path", SolrInfoBean.Category.CONTAINER.toString(), "fs", "coreRoot");
-    solrMetricsContext.gauge(() -> false,
-        true, "spins", SolrInfoBean.Category.CONTAINER.toString(), "fs", "coreRoot");
     // add version information
     solrMetricsContext.gauge(() -> this.getClass().getPackage().getSpecificationVersion(),
         true, "specification", SolrInfoBean.Category.CONTAINER.toString(), "version");
diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java b/solr/core/src/java/org/apache/solr/core/SolrCore.java
index 8555591..6fb7b60 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrCore.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java
@@ -1228,7 +1228,6 @@ public final class SolrCore implements SolrInfoBean, Closeable {
     parentContext.gauge(() -> dataDirFile.getTotalSpace(), true, "totalSpace", Category.CORE.toString(),
"fs");
     parentContext.gauge(() -> dataDirFile.getUsableSpace(), true, "usableSpace", Category.CORE.toString(),
"fs");
     parentContext.gauge(() -> dataDirPath.toAbsolutePath().toString(), true, "path", Category.CORE.toString(),
"fs");
-    parentContext.gauge(() -> false, true, "spins", Category.CORE.toString(), "fs");
   }
 
   public String getMetricTag() {
diff --git a/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java b/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
index 992b973..9677769 100644
--- a/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/metrics/SolrMetricsIntegrationTest.java
@@ -171,24 +171,12 @@ public class SolrMetricsIntegrationTest extends SolrTestCaseJ4 {
     assertTrue(metrics.containsKey("CONTAINER.fs.totalSpace"));
     assertTrue(metrics.containsKey("CONTAINER.fs.usableSpace"));
     assertTrue(metrics.containsKey("CONTAINER.fs.path"));
-    assertTrue(metrics.containsKey("CONTAINER.fs.spins"));
     assertTrue(metrics.containsKey("CONTAINER.fs.coreRoot.totalSpace"));
     assertTrue(metrics.containsKey("CONTAINER.fs.coreRoot.usableSpace"));
     assertTrue(metrics.containsKey("CONTAINER.fs.coreRoot.path"));
-    assertTrue(metrics.containsKey("CONTAINER.fs.coreRoot.spins"));
     assertTrue(metrics.containsKey("CONTAINER.version.specification"));
     assertTrue(metrics.containsKey("CONTAINER.version.implementation"));
     Gauge<?> g = (Gauge<?>)metrics.get("CONTAINER.fs.path");
     assertEquals(g.getValue(), cc.getSolrHome());
-    boolean spins = false;
-    g = (Gauge<?>)metrics.get("CONTAINER.fs.coreRoot.spins");
-    assertEquals(spins, g.getValue());
-    g = (Gauge<?>)metrics.get("CONTAINER.fs.spins");
-    if (cc.getConfig().getSolrDataHome() != null) {
-      spins = false;
-      assertEquals(spins, g.getValue());
-    } else {
-      assertEquals(spins, g.getValue());
-    }
   }
 }


Mime
View raw message