cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [2/2] git commit: Don't expire columns sooner than they should with 2ndary indexes
Date Thu, 20 Dec 2012 09:08:12 GMT
Don't expire columns sooner than they should with 2ndary indexes

patch by amorton; reviewed by slebresne for CASSANDRA-5079


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

Branch: refs/heads/cassandra-1.2.0
Commit: 34630f6447c188ca02ecb8276c5fcc6a505f75fa
Parents: 1a66ee9
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Thu Dec 20 10:05:47 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Thu Dec 20 10:05:47 2012 +0100

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../cassandra/db/compaction/CompactionManager.java |    4 +++-
 2 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/34630f64/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 38d9d47..a36ccd2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
 1.1.9
  * fix multithreaded compaction deadlock (CASSANDRA-4492)
  * fix specifying and altering crc_check_chance (CASSANDRA-5053)
+ * Don't expire columns sooner than they should in 2ndary indexes (CASSANDRA-5079)
 
 
 1.1.8

http://git-wip-us.apache.org/repos/asf/cassandra/blob/34630f64/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index ed1fb7e..40e01ca 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -842,8 +842,10 @@ public class CompactionManager implements CompactionManagerMBean
 
     static int getDefaultGcBefore(ColumnFamilyStore cfs)
     {
+        // 2ndary indexes have ExpiringColumns too, so we need to purge tombstones deleted
before now. We do not need to
+        // add any GcGrace however since 2ndary indexes are local to a node.
         return cfs.isIndex()
-               ? GC_ALL
+               ? (int) (System.currentTimeMillis() / 1000)
                : (int) (System.currentTimeMillis() / 1000) - cfs.metadata.getGcGraceSeconds();
     }
 


Mime
View raw message