Repository: cassandra
Updated Branches:
  refs/heads/trunk b09e39295 -> 1b0a59e2a


Fix merge from CASSANDRA-8359


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

Branch: refs/heads/trunk
Commit: 0ba5f2721b8d6b57592532654d8533acb9964807
Parents: 52191eb
Author: Marcus Eriksson <marc...@apache.org>
Authored: Wed Apr 1 13:14:40 2015 +0200
Committer: Marcus Eriksson <marc...@apache.org>
Committed: Wed Apr 1 13:14:40 2015 +0200

----------------------------------------------------------------------
 .../cassandra/db/compaction/DateTieredCompactionStrategy.java      | 2 +-
 .../cassandra/db/compaction/DateTieredCompactionStrategyTest.java  | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0ba5f272/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 7841c93..d955ebf 100644
--- 
a/src/java/org/apache/cassandra/db/compaction/DateTieredCompactionStrategy.java
+++ 
b/src/java/org/apache/cassandra/db/compaction/DateTieredCompactionStrategy.java
@@ -74,7 +74,7 @@ public class DateTieredCompactionStrategy extends 
AbstractCompactionStrategy
         if (!isEnabled() || cfs.getSSTables().isEmpty())
             return Collections.emptyList();
 
-        Set<SSTableReader> uncompacting = cfs.getUncompactingSSTables();
+        Set<SSTableReader> uncompacting = Sets.intersection(sstables, 
cfs.getUncompactingSSTables());
 
         // Find fully expired SSTables. Those will be included no matter what.
         Set<SSTableReader> expired = 
CompactionController.getFullyExpiredSSTables(cfs, uncompacting, 
cfs.getOverlappingSSTables(uncompacting), gcBefore);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0ba5f272/test/unit/org/apache/cassandra/db/compaction/DateTieredCompactionStrategyTest.java
----------------------------------------------------------------------
diff --git 
a/test/unit/org/apache/cassandra/db/compaction/DateTieredCompactionStrategyTest.java
 
b/test/unit/org/apache/cassandra/db/compaction/DateTieredCompactionStrategyTest.java
index becddeb..743a337 100644
--- 
a/test/unit/org/apache/cassandra/db/compaction/DateTieredCompactionStrategyTest.java
+++ 
b/test/unit/org/apache/cassandra/db/compaction/DateTieredCompactionStrategyTest.java
@@ -306,6 +306,8 @@ public class DateTieredCompactionStrategyTest extends 
SchemaLoader
         
options.put(DateTieredCompactionStrategyOptions.TIMESTAMP_RESOLUTION_KEY, 
"MILLISECONDS");
         options.put(DateTieredCompactionStrategyOptions.MAX_SSTABLE_AGE_KEY, 
Double.toString((1d / (24 * 60 * 60))));
         DateTieredCompactionStrategy dtcs = new 
DateTieredCompactionStrategy(cfs, options);
+        for (SSTableReader sstable : cfs.getSSTables())
+            dtcs.addSSTable(sstable);
         dtcs.startup();
         assertNull(dtcs.getNextBackgroundTask((int) 
(System.currentTimeMillis() / 1000)));
         Thread.sleep(7000);

Reply via email to