cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] git commit: Clean up Memtable.resolve()
Date Sat, 08 Feb 2014 01:12:20 GMT
Updated Branches:
  refs/heads/cassandra-2.0 130d135a6 -> 800e45f48


Clean up Memtable.resolve()


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

Branch: refs/heads/cassandra-2.0
Commit: 887558f7a3c6a5bbb38a1cf0bacad90f8baa4f0e
Parents: c70f6d8
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Sat Feb 8 04:11:32 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Sat Feb 8 04:11:32 2014 +0300

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/887558f7/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 b229060..b6fceda 100644
--- a/src/java/org/apache/cassandra/db/Memtable.java
+++ b/src/java/org/apache/cassandra/db/Memtable.java
@@ -192,7 +192,6 @@ public class Memtable
     {
         ColumnFamily previous = columnFamilies.get(key);
 
-        long sizeDelta = 0;
         if (previous == null)
         {
             // AtomicSortedColumns doesn't work for super columns (see #3821)
@@ -200,13 +199,10 @@ public class Memtable
             // We'll add the columns later. This avoids wasting works if we get beaten in
the putIfAbsent
             previous = columnFamilies.putIfAbsent(new DecoratedKey(key.token, allocator.clone(key.key)),
empty);
             if (previous == null)
-            {
                 previous = empty;
-                sizeDelta += empty.deletionInfo().dataSize();
-            }
         }
 
-        sizeDelta = previous.addAllWithSizeDelta(cf, allocator, localCopyFunction, indexer);
+        long sizeDelta = previous.addAllWithSizeDelta(cf, allocator, localCopyFunction, indexer);
         currentSize.addAndGet(sizeDelta);
         currentOperations.addAndGet(cf.getColumnCount() + (cf.isMarkedForDelete() ? 1 : 0)
+ cf.deletionInfo().rangeCount());
     }


Mime
View raw message