cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [2/3] git commit: Fix columns expiring in the middle of 2 phase compactions
Date Wed, 24 Jul 2013 14:58:33 GMT
Fix columns expiring in the middle of 2 phase compactions

patch by slebresne; reviewed by jbellis for CASSANDRA-5799


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

Branch: refs/heads/trunk
Commit: d38446a1bbca0abf7a2af8986fecf348355abafb
Parents: 9ae960a
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Wed Jul 24 16:43:38 2013 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Wed Jul 24 16:43:38 2013 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                        | 1 +
 src/java/org/apache/cassandra/db/DeletionTime.java                 | 2 +-
 .../org/apache/cassandra/db/compaction/LazilyCompactedRow.java     | 1 -
 3 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d38446a1/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index da03306..aaeb10b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -26,6 +26,7 @@
  * Don't rely on row marker for queries in general to hide lost markers
    after TTL expires (CASSANDRA-5762)
  * Sort nodetool help output (CASSANDRA-5776)
+ * Fix column expiring during 2 phases compaction (CASSANDRA-5799)
 
 
 1.2.6

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d38446a1/src/java/org/apache/cassandra/db/DeletionTime.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/DeletionTime.java b/src/java/org/apache/cassandra/db/DeletionTime.java
index bcb1b01..deab30b 100644
--- a/src/java/org/apache/cassandra/db/DeletionTime.java
+++ b/src/java/org/apache/cassandra/db/DeletionTime.java
@@ -85,7 +85,7 @@ public class DeletionTime implements Comparable<DeletionTime>
 
     public boolean isDeleted(IColumn column)
     {
-        return column.isMarkedForDelete() && column.getMarkedForDeleteAt() <=
markedForDeleteAt;
+        return column.mostRecentLiveChangeAt() <= markedForDeleteAt;
     }
 
     public long memorySize()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d38446a1/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
index 9575d41..9a03598 100644
--- a/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
+++ b/src/java/org/apache/cassandra/db/compaction/LazilyCompactedRow.java
@@ -293,7 +293,6 @@ public class LazilyCompactedRow extends AbstractCompactedRow implements
Iterable
 
                 // PrecompactedRow.removeDeletedAndOldShards have only checked the top-level
CF deletion times,
                 // not the range tombstone. For that we use the columnIndexer tombstone tracker.
-                // Note that this doesn't work for super columns.
                 if (indexBuilder.tombstoneTracker().isDeleted(reduced))
                     return null;
 


Mime
View raw message