cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [1/2] cassandra git commit: Add more logging to be able to debug what files readMeter can be null for.
Date Fri, 14 Nov 2014 07:23:18 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 0c6050bca -> 3b6edc6af


Add more logging to be able to debug what files readMeter can be null for.

Patch by marcuse; reviewed by thobbs for CASSANDRA-8238


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

Branch: refs/heads/trunk
Commit: 054beee45dd2fe8c221935dc87c59da04359a2a4
Parents: 1470cee
Author: Marcus Eriksson <marcuse@apache.org>
Authored: Tue Nov 11 10:12:58 2014 +0100
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Fri Nov 14 08:01:27 2014 +0100

----------------------------------------------------------------------
 CHANGES.txt                                                   | 1 +
 .../cassandra/db/compaction/SizeTieredCompactionStrategy.java | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/054beee4/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 6517c6a..6228893 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.3
+ * Add more log info if readMeter is null (CASSANDRA-8238)
  * add check of the system wall clock time at startup (CASSANDRA-8305)
  * Support for frozen collections (CASSANDRA-7859)
  * Fix overflow on histogram computation (CASSANDRA-8028)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/054beee4/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
b/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
index b72737a..4b44426 100644
--- a/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/SizeTieredCompactionStrategy.java
@@ -155,7 +155,12 @@ public class SizeTieredCompactionStrategy extends AbstractCompactionStrategy
         int cutoffIndex = 0;
         while (cutoffIndex < sstables.size())
         {
-            double reads = sstables.get(cutoffIndex).readMeter.twoHourRate();
+            SSTableReader sstable = sstables.get(cutoffIndex);
+            if (sstable.readMeter == null)
+            {
+                throw new AssertionError("If you're seeing this exception, please attach
your logs to CASSANDRA-8238 to help us debug. "+sstable);
+            }
+            double reads = sstable.readMeter.twoHourRate();
             if (totalColdReads + reads > maxColdReads)
                 break;
 


Mime
View raw message