cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [2/3] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0
Date Sat, 08 Feb 2014 01:13:50 GMT
Merge branch 'cassandra-1.2' into cassandra-2.0


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

Branch: refs/heads/trunk
Commit: 800e45f48c8860696559d896f28be1f3bd2ca86f
Parents: 130d135 887558f
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Sat Feb 8 04:12:04 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Sat Feb 8 04:12:04 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/800e45f4/src/java/org/apache/cassandra/db/Memtable.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/Memtable.java
index 01170d6,b6fceda..1d26779
--- a/src/java/org/apache/cassandra/db/Memtable.java
+++ b/src/java/org/apache/cassandra/db/Memtable.java
@@@ -180,22 -190,19 +180,18 @@@ public class Memtabl
  
      private void resolve(DecoratedKey key, ColumnFamily cf, SecondaryIndexManager.Updater
indexer)
      {
 -        ColumnFamily previous = columnFamilies.get(key);
 +        AtomicSortedColumns previous = rows.get(key);
  
-         long sizeDelta = 0;
          if (previous == null)
          {
 -            // AtomicSortedColumns doesn't work for super columns (see #3821)
 -            ColumnFamily empty = cf.cloneMeShallow(cf.isSuper() ? ThreadSafeSortedColumns.factory()
: AtomicSortedColumns.factory(), false);
 +            AtomicSortedColumns empty = cf.cloneMeShallow(AtomicSortedColumns.factory, false);
              // 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);
 +            previous = rows.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