cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [2/3] git commit: Fix NPE in sstablesplit
Date Tue, 17 Sep 2013 13:33:49 GMT
Fix NPE in sstablesplit

patch by slebresne; reviewed by iamaleksey for CASSANDRA-6027


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

Branch: refs/heads/trunk
Commit: 56b5c6f3024625b90f7a1deef1def7a7002b6e28
Parents: 765d1e9
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Sep 17 15:31:13 2013 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Tue Sep 17 15:31:13 2013 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                      | 1 +
 .../org/apache/cassandra/db/compaction/CompactionController.java | 4 ++++
 2 files changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/56b5c6f3/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index a9a658e..f48fb5c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -18,6 +18,7 @@
  * Fix paxos bugs (CASSANDRA-6012, 6013, 6023)
  * Fix paged ranges with multiple replicas (CASSANDRA-6004)
  * Fix potential AssertionError during tracing (CASSANDRA-6041)
+ * Fix NPE in sstablesplit (CASSANDRA-6027)
 Merged from 1.2:
 1.2.10
  * Fix possible divide-by-zero in HHOM (CASSANDRA-5990)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/56b5c6f3/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 3219926..9552895 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionController.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionController.java
@@ -100,6 +100,10 @@ public class CompactionController
     public static Set<SSTableReader> getFullyExpiredSSTables(ColumnFamilyStore cfStore,
Set<SSTableReader> compacting, Set<SSTableReader> overlapping, int gcBefore)
     {
         logger.debug("Checking droppable sstables in {}", cfStore);
+
+        if (compacting == null)
+            return Collections.<SSTableReader>emptySet();
+
         List<SSTableReader> candidates = new ArrayList<SSTableReader>();
 
         long minTimestamp = Integer.MAX_VALUE;


Mime
View raw message