cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [4/9] git commit: Fix NPE in MeteredFlusher patch by Nicolas Favre-Felix; reviewed by jbellis for CASSANDRA-6820
Date Sat, 22 Mar 2014 03:00:36 GMT
Fix NPE in MeteredFlusher
patch by Nicolas Favre-Felix; reviewed by jbellis for CASSANDRA-6820


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

Branch: refs/heads/cassandra-2.0
Commit: 535c56fb217c1a12d2fb9a217203c03d26642444
Parents: d1cc701
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri Mar 21 21:58:26 2014 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri Mar 21 21:58:26 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                          | 1 +
 src/java/org/apache/cassandra/db/MeteredFlusher.java | 5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/535c56fb/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 64dc248..ed202cc 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.7
+ * Fix NPE in MeteredFlusher (CASSANDRA-6820)
  * Fix race processing range scan responses (CASSANDRA-6820)
  * Allow deleting snapshots from dropped keyspaces (CASSANDRA-6821)
  * Add uuid() function (CASSANDRA-6473)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/535c56fb/src/java/org/apache/cassandra/db/MeteredFlusher.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/MeteredFlusher.java b/src/java/org/apache/cassandra/db/MeteredFlusher.java
index f1a3ac9..5c71fc6 100644
--- a/src/java/org/apache/cassandra/db/MeteredFlusher.java
+++ b/src/java/org/apache/cassandra/db/MeteredFlusher.java
@@ -37,9 +37,8 @@ public class MeteredFlusher implements Runnable
         long totalMemtableBytesAllowed = DatabaseDescriptor.getTotalMemtableSpaceInMB() *
1048576L;
 
         // first, find how much memory non-active memtables are using
-        long flushingBytes = Memtable.activelyMeasuring == null
-                           ? 0
-                           : Memtable.activelyMeasuring.getMemtableThreadSafe().getLiveSize();
+        ColumnFamilyStore measuredCfs = Memtable.activelyMeasuring;
+        long flushingBytes = measuredCfs == null ? 0 : measuredCfs.getMemtableThreadSafe().getLiveSize();
         flushingBytes += countFlushingBytes();
         if (flushingBytes > 0)
             logger.debug("Currently flushing {} bytes of {} max", flushingBytes, totalMemtableBytesAllowed);


Mime
View raw message