cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/3] git commit: comment
Date Fri, 04 Oct 2013 13:39:47 GMT
comment


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

Branch: refs/heads/trunk
Commit: 518c0dfaa8746635414b71b6a4f802e8fc8dc463
Parents: 8dfd75d
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri Oct 4 08:39:28 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri Oct 4 08:39:33 2013 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/db/Memtable.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/518c0dfa/src/java/org/apache/cassandra/db/Memtable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/Memtable.java b/src/java/org/apache/cassandra/db/Memtable.java
index f1bb1a5..9a8f810 100644
--- a/src/java/org/apache/cassandra/db/Memtable.java
+++ b/src/java/org/apache/cassandra/db/Memtable.java
@@ -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,
                                                                                         
 Integer.MAX_VALUE,


Mime
View raw message