cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1095438 - in /cassandra/branches/cassandra-0.7: CHANGES.txt src/java/org/apache/cassandra/db/Memtable.java
Date Wed, 20 Apr 2011 15:53:17 GMT
Author: jbellis
Date: Wed Apr 20 15:53:17 2011
New Revision: 1095438

URL: http://svn.apache.org/viewvc?rev=1095438&view=rev
Log:
count a row deletionas one operation towards memtable threshold
patch by Aaron Morton; reviewed by jbellis for CASSANDRA-2519

Modified:
    cassandra/branches/cassandra-0.7/CHANGES.txt
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Memtable.java

Modified: cassandra/branches/cassandra-0.7/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/CHANGES.txt?rev=1095438&r1=1095437&r2=1095438&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.7/CHANGES.txt Wed Apr 20 15:53:17 2011
@@ -32,6 +32,8 @@
  * avoid caching token-only decoratedkeys (CASSANDRA-2416)
  * preserve version when streaming data from old sstables (CASSANDRA-2283)
  * fix backslash substitutions in CLI (CASSANDRA-2492)
+ * count a row deletion as one operation towards memtable threshold 
+   (CASSANDRA-2519)
 
 
 0.7.4

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Memtable.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Memtable.java?rev=1095438&r1=1095437&r2=1095438&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Memtable.java (original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Memtable.java Wed Apr
20 15:53:17 2011
@@ -128,7 +128,9 @@ public class Memtable implements Compara
     private void resolve(DecoratedKey key, ColumnFamily cf)
     {
         currentThroughput.addAndGet(cf.size());
-        currentOperations.addAndGet(cf.getColumnCount());
+        currentOperations.addAndGet((cf.getColumnCount() == 0)
+                                    ? cf.isMarkedForDelete() ? 1 : 0
+                                    : cf.getColumnCount());
 
         ColumnFamily oldCf = columnFamilies.putIfAbsent(key, cf);
         if (oldCf == null)



Mime
View raw message