cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jji...@apache.org
Subject [3/6] cassandra git commit: Failed unregistering mbean during drop keyspace
Date Tue, 06 Jun 2017 18:58:24 GMT
Failed unregistering mbean during drop keyspace

Patch by Lerh Chuan Low; Reviewed by Chris Lohfink for CASSANDRA-13346


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/40ad3cf4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/40ad3cf4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/40ad3cf4

Branch: refs/heads/trunk
Commit: 40ad3cf4dd384bede595edce4617534ca904f1ed
Parents: 17a7a80
Author: Jeff Jirsa <jeff@jeffjirsa.net>
Authored: Tue Jun 6 11:55:55 2017 -0700
Committer: Jeff Jirsa <jeff@jeffjirsa.net>
Committed: Tue Jun 6 11:55:55 2017 -0700

----------------------------------------------------------------------
 CHANGES.txt                                             |  1 +
 src/java/org/apache/cassandra/metrics/TableMetrics.java | 12 ++++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/40ad3cf4/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 0076b2c..63bb33c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.14
+ * Failed unregistering mbean during drop keyspace (CASSANDRA-13346)
  * nodetool scrub/cleanup/upgradesstables exit code is wrong (CASSANDRA-13542)
  * Fix the reported number of sstable data files accessed per read (CASSANDRA-13120)
  * Fix schema digest mismatch during rolling upgrades from versions before 3.0.12 (CASSANDRA-13559)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/40ad3cf4/src/java/org/apache/cassandra/metrics/TableMetrics.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/metrics/TableMetrics.java b/src/java/org/apache/cassandra/metrics/TableMetrics.java
index a21e8ca..a493836 100644
--- a/src/java/org/apache/cassandra/metrics/TableMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/TableMetrics.java
@@ -659,10 +659,14 @@ public class TableMetrics
     {
         for(Map.Entry<String, String> entry : all.entrySet())
         {
-            CassandraMetricsRegistry.MetricName name = factory.createMetricName(entry.getKey());
-            CassandraMetricsRegistry.MetricName alias = aliasFactory.createMetricName(entry.getValue());
-            allTableMetrics.get(entry.getKey()).remove(Metrics.getMetrics().get(name.getMetricName()));
-            Metrics.remove(name, alias);
+            final CassandraMetricsRegistry.MetricName name = factory.createMetricName(entry.getKey());
+            final Metric metric = Metrics.getMetrics().get(name.getMetricName());
+            if (metric != null)
+            {  // Metric will be null if it's a view metric we are releasing. Views have
null for ViewLockAcquireTime and ViewLockReadTime
+                final CassandraMetricsRegistry.MetricName alias = aliasFactory.createMetricName(entry.getValue());
+                allTableMetrics.get(entry.getKey()).remove(metric);
+                Metrics.remove(name, alias);
+            }
         }
         readLatency.release();
         writeLatency.release();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message