cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject git commit: Optimize tombstone creation for ExpiringColumns patch by Christian Spriegel; reviewed by slebresne for CASSANDRA-4917
Date Sun, 24 Mar 2013 05:57:53 GMT
Updated Branches:
  refs/heads/trunk 17b516913 -> 8744c04d3


Optimize tombstone creation for ExpiringColumns
patch by Christian Spriegel; reviewed by slebresne for CASSANDRA-4917


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

Branch: refs/heads/trunk
Commit: 8744c04d323bebd5b08c03ae8241e3bf24fc95a6
Parents: 17b5169
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Sun Mar 24 00:57:48 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Sun Mar 24 00:57:48 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../org/apache/cassandra/db/ExpiringColumn.java    |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8744c04d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e940f7b..586a760 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0
+ * Optimize tombstone creation for ExpiringColumns (CASSANDRA-4917)
  * Improve LeveledScanner work estimation (CASSANDRA-5250)
  * Replace compaction lock with runWithCompactionsDisabled (CASSANDRA-3430)
  * Change Message IDs to ints (CASSANDRA-5307)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8744c04d/src/java/org/apache/cassandra/db/ExpiringColumn.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ExpiringColumn.java b/src/java/org/apache/cassandra/db/ExpiringColumn.java
index fa21d27..80631ee 100644
--- a/src/java/org/apache/cassandra/db/ExpiringColumn.java
+++ b/src/java/org/apache/cassandra/db/ExpiringColumn.java
@@ -65,8 +65,11 @@ public class ExpiringColumn extends Column
     {
         if (localExpirationTime >= expireBefore || flag == ColumnSerializer.Flag.PRESERVE_SIZE)
             return new ExpiringColumn(name, value, timestamp, timeToLive, localExpirationTime);
-        // the column is now expired, we can safely return a simple tombstone
-        return new DeletedColumn(name, localExpirationTime, timestamp);
+        // The column is now expired, we can safely return a simple tombstone. Note that
+        // as long as the expiring column and the tombstone put together live longer than
GC grace seconds,
+        // we'll fulfil our responsibility to repair.  See discussion at
+        // http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/repair-compaction-and-tombstone-rows-td7583481.html
+        return new DeletedColumn(name, localExpirationTime - timeToLive, timestamp);
     }
 
     public int getTimeToLive()


Mime
View raw message