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: Fix CC#collectTimeOrderedData() tombstone optimisations
Date Wed, 25 Jun 2014 21:33:03 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 23893ead5 -> e88b88891


Fix CC#collectTimeOrderedData() tombstone optimisations

patch by Aleksey Yeschenko; reviewed by Jonathan Ellis for
CASSANDRA-7394


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

Branch: refs/heads/cassandra-2.1
Commit: 77bbcc18fa04ab16026fc42768d528c81adde8e1
Parents: 2ab7b07
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Wed Jun 25 14:25:58 2014 -0700
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Wed Jun 25 14:25:58 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                               | 1 +
 src/java/org/apache/cassandra/db/CollationController.java | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/77bbcc18/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 1ff5675..84be96d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.9
+ * Fix CC#collectTimeOrderedData() tombstone optimisations (CASSANDRA-7394)
  * Fix assertion error in CL.ANY timeout handling (CASSANDRA-7364)
  * Handle empty CFs in Memtable#maybeUpdateLiveRatio() (CASSANDRA-7401)
  * Fix native protocol CAS batches (CASSANDRA-7337)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/77bbcc18/src/java/org/apache/cassandra/db/CollationController.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/CollationController.java b/src/java/org/apache/cassandra/db/CollationController.java
index 33d77ee..4a08a26 100644
--- a/src/java/org/apache/cassandra/db/CollationController.java
+++ b/src/java/org/apache/cassandra/db/CollationController.java
@@ -77,6 +77,7 @@ public class CollationController
         try
         {
             Tracing.trace("Merging memtable contents");
+            long mostRecentRowTombstone = Long.MIN_VALUE;
             for (Memtable memtable : view.memtables)
             {
                 OnDiskAtomIterator iter = filter.getMemtableColumnIterator(memtable);
@@ -89,6 +90,7 @@ public class CollationController
                 }
 
                 container.addAll(temp, HeapAllocator.instance);
+                mostRecentRowTombstone = container.deletionInfo().getTopLevelDeletion().markedForDeleteAt;
                 temp.clear();
             }
 
@@ -102,7 +104,6 @@ public class CollationController
             Collections.sort(view.sstables, SSTable.maxTimestampComparator);
 
             // read sorted sstables
-            long mostRecentRowTombstone = Long.MIN_VALUE;
             for (SSTableReader sstable : view.sstables)
             {
                 // if we've already seen a row tombstone with a timestamp greater
@@ -122,8 +123,6 @@ public class CollationController
                 if (iter.getColumnFamily() != null)
                 {
                     ColumnFamily cf = iter.getColumnFamily();
-                    if (cf.isMarkedForDelete())
-                        mostRecentRowTombstone = cf.deletionInfo().getTopLevelDeletion().markedForDeleteAt;
                     temp.delete(cf);
                     sstablesIterated++;
                     while (iter.hasNext())
@@ -131,6 +130,7 @@ public class CollationController
                 }
 
                 container.addAll(temp, HeapAllocator.instance);
+                mostRecentRowTombstone = container.deletionInfo().getTopLevelDeletion().markedForDeleteAt;
                 temp.clear();
             }
 


Mime
View raw message