cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [01/10] cassandra git commit: Avoid NPE when performing sstable tasks (scrub etc)
Date Thu, 14 Jan 2016 16:07:19 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 97474ee36 -> 101cd72e5
  refs/heads/cassandra-3.0 162edc26e -> a3ae9d8bd
  refs/heads/cassandra-3.3 09364e03e -> 628c07678
  refs/heads/trunk ef4d4506e -> fc89a379c


Avoid NPE when performing sstable tasks (scrub etc)

patch by yukim; reviewed by marcuse for CASSANDRA-10980


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

Branch: refs/heads/cassandra-2.2
Commit: 101cd72e55168f6a97bbb2556aed9f23cef80f42
Parents: 97474ee
Author: Yuki Morishita <yukim@apache.org>
Authored: Mon Jan 11 14:48:38 2016 -0600
Committer: Yuki Morishita <yukim@apache.org>
Committed: Thu Jan 14 09:56:59 2016 -0600

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/101cd72e/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 6530956..52e3d4d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.5
+ * Avoid NPE when performing sstable tasks (scrub etc.) (CASSANDRA-10980)
  * Make sure client gets tombstone overwhelmed warning (CASSANDRA-9465)
  * Fix error streaming section more than 2GB (CASSANDRA-10961)
  * (cqlsh) Also apply --connect-timeout to control connection

http://git-wip-us.apache.org/repos/asf/cassandra/blob/101cd72e/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index ba9c25e..e0caf76 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -258,9 +258,9 @@ public class CompactionManager implements CompactionManagerMBean
     private AllSSTableOpStatus parallelAllSSTableOperation(final ColumnFamilyStore cfs, final
OneSSTableOperation operation, OperationType operationType) throws ExecutionException, InterruptedException
     {
         List<LifecycleTransaction> transactions = new ArrayList<>();
-        try (LifecycleTransaction compacting = cfs.markAllCompacting(operationType);)
+        try (LifecycleTransaction compacting = cfs.markAllCompacting(operationType))
         {
-            Iterable<SSTableReader> sstables = Lists.newArrayList(operation.filterSSTables(compacting));
+            Iterable<SSTableReader> sstables = compacting != null ? Lists.newArrayList(operation.filterSSTables(compacting))
: Collections.<SSTableReader>emptyList();
             if (Iterables.isEmpty(sstables))
             {
                 logger.info("No sstables for {}.{}", cfs.keyspace.getName(), cfs.name);


Mime
View raw message