cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [04/10] cassandra git commit: Avoid mixing repaired and unrepaired sstables in DTCS
Date Mon, 08 Feb 2016 08:05:33 GMT
Avoid mixing repaired and unrepaired sstables in DTCS

Patch by Blake Eggleston; reviewed by marcuse for CASSANDRA-11113


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

Branch: refs/heads/trunk
Commit: dd23adf1411e1ccd55a7d89437eccbbd916807f1
Parents: 26aa19e
Author: Blake Eggleston <bdeggleston@gmail.com>
Authored: Fri Feb 5 17:23:48 2016 +0100
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Mon Feb 8 08:49:37 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd23adf1/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 1793c32..054ad1d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.13
+ * Avoid major compaction mixing repaired and unrepaired sstables in DTCS (CASSANDRA-11113)
  * test_bulk_round_trip_blogposts is failing occasionally (CASSANDRA-10938)
  * Fix isJoined return true only after becoming cluster member (CASANDRA-11007)
  * Fix bad gossip generation seen in long-running clusters (CASSANDRA-10969)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd23adf1/src/java/org/apache/cassandra/db/compaction/DateTieredCompactionStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/DateTieredCompactionStrategy.java
b/src/java/org/apache/cassandra/db/compaction/DateTieredCompactionStrategy.java
index ae684ec..64a599d 100644
--- a/src/java/org/apache/cassandra/db/compaction/DateTieredCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/DateTieredCompactionStrategy.java
@@ -385,11 +385,12 @@ public class DateTieredCompactionStrategy extends AbstractCompactionStrategy
     @Override
     public synchronized Collection<AbstractCompactionTask> getMaximalTask(int gcBefore)
     {
-        Iterable<SSTableReader> sstables = cfs.markAllCompacting();
-        if (sstables == null)
+        Iterable<SSTableReader> filteredSSTables = filterSuspectSSTables(sstables);
+        if (Iterables.isEmpty(filteredSSTables))
             return null;
-
-        return Collections.<AbstractCompactionTask>singleton(new CompactionTask(cfs,
sstables, gcBefore, false));
+        if (!cfs.getDataTracker().markCompacting(ImmutableList.copyOf(filteredSSTables)))
+            return null;
+        return Collections.<AbstractCompactionTask>singleton(new CompactionTask(cfs,
filteredSSTables, gcBefore, false));
     }
 
     @Override


Mime
View raw message