cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/3] git commit: fix getOverlappingSSTables for streaming's skeleton compaction controller patch by yukim; reviewed by jbellis for CASSANDRA-4080
Date Tue, 27 Mar 2012 04:35:51 GMT
fix getOverlappingSSTables for streaming's skeleton compaction controller
patch by yukim; reviewed by jbellis for CASSANDRA-4080


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

Branch: refs/heads/trunk
Commit: b4af12b43ba9aef71613274a12d037b0caaffd4b
Parents: 45af95a
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Mon Mar 26 23:34:12 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Mon Mar 26 23:34:12 2012 -0500

----------------------------------------------------------------------
 .../org/apache/cassandra/db/ColumnFamilyStore.java |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b4af12b4/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 4475070..f9a4eb6 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -848,7 +848,11 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
      */
     public Set<SSTableReader> getOverlappingSSTables(Collection<SSTableReader>
sstables)
     {
-        assert !sstables.isEmpty();
+        // a normal compaction won't ever have an empty sstables list, but we create a skeleton
+        // compaction controller for streaming, and that passes an empty list.
+        if (sstables.isEmpty())
+            return ImmutableSet.of();
+
         IntervalTree<SSTableReader> tree = data.getView().intervalTree;
 
         Set<SSTableReader> results = null;


Mime
View raw message