cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [1/3] cassandra git commit: Ignore fully expired sstables when finding min timestamp
Date Fri, 12 Jun 2015 16:52:50 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 b61da9b56 -> 271c9e4ac


Ignore fully expired sstables when finding min timestamp

Patch by marcuse; reviewed by slebresne for CASSANDRA-9572


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

Branch: refs/heads/cassandra-2.2
Commit: 9e60611fb807ad1bd03a13ef1fe55bf905100064
Parents: 3ddd17b
Author: Marcus Eriksson <marcuse@apache.org>
Authored: Thu Jun 11 08:33:54 2015 +0200
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Fri Jun 12 18:50:01 2015 +0200

----------------------------------------------------------------------
 .../apache/cassandra/db/compaction/CompactionController.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9e60611f/src/java/org/apache/cassandra/db/compaction/CompactionController.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionController.java b/src/java/org/apache/cassandra/db/compaction/CompactionController.java
index 7a4b7d9..59453cc 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionController.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionController.java
@@ -102,7 +102,12 @@ public class CompactionController
         long minTimestamp = Long.MAX_VALUE;
 
         for (SSTableReader sstable : overlapping)
-            minTimestamp = Math.min(minTimestamp, sstable.getMinTimestamp());
+        {
+            // Overlapping might include fully expired sstables. What we care about here
is
+            // the min timestamp of the overlapping sstables that actually contain live data.
+            if (sstable.getSSTableMetadata().maxLocalDeletionTime >= gcBefore)
+                minTimestamp = Math.min(minTimestamp, sstable.getMinTimestamp());
+        }
 
         for (SSTableReader candidate : compacting)
         {


Mime
View raw message