cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [1/3] git commit: comment
Date Fri, 04 Oct 2013 13:39:46 GMT
Updated Branches:
  refs/heads/cassandra-2.0 8dfd75de1 -> 518c0dfaa
  refs/heads/trunk bbf3cc516 -> 889da51b4



Branch: refs/heads/cassandra-2.0
Commit: 518c0dfaa8746635414b71b6a4f802e8fc8dc463
Parents: 8dfd75d
Author: Jonathan Ellis <>
Authored: Fri Oct 4 08:39:28 2013 -0500
Committer: Jonathan Ellis <>
Committed: Fri Oct 4 08:39:33 2013 -0500

 src/java/org/apache/cassandra/db/ | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/java/org/apache/cassandra/db/ b/src/java/org/apache/cassandra/db/
index f1bb1a5..9a8f810 100644
--- a/src/java/org/apache/cassandra/db/
+++ b/src/java/org/apache/cassandra/db/
@@ -71,11 +71,11 @@ public class Memtable
     // max liveratio seen w/ 1-byte columns on a 64-bit jvm was 19. If it gets higher than
64 something is probably broken.
     private static final double MAX_SANE_LIVE_RATIO = 64.0;
-    // we want to limit the amount of concurrently running and/or queued meterings, because
counting is slow (can be
-    // minutes, for a large memtable and a busy server). so we could keep memtables
-    // alive after they're flushed and would otherwise be GC'd. the approach we take is to
bound the number of
-    // outstanding/running meterings to a maximum of one per CFS using this set; the executor's
queue is unbounded but
-    // will implicitly be bounded by the number of CFS:s.
+    // We need to take steps to avoid retaining inactive membtables in memory, because counting
is slow (can be
+    // minutes, for a large memtable and a busy server).  A strictly FIFO Memtable queue
could keep memtables
+    // alive waiting for metering after they're flushed and would otherwise be GC'd.  Instead,
the approach we take
+    // is to enqueue the CFS instead of the memtable, and to meter whatever the active memtable
is when the executor
+    // starts to work on it.  We use a Set to make sure we don't enqueue redundant tasks
for the same CFS.
     private static final Set<ColumnFamilyStore> meteringInProgress = new NonBlockingHashSet<ColumnFamilyStore>();
     private static final ExecutorService meterExecutor = new JMXEnabledThreadPoolExecutor(1,

View raw message