cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [03/17] git commit: catch all Throwables, not just Exceptions
Date Tue, 06 Aug 2013 21:56:19 GMT
catch all Throwables, not just Exceptions


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

Branch: refs/heads/cassandra-1.2
Commit: 238139cda53eae51516c477f7ac10c5397df02a4
Parents: 155afa1
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Tue Aug 6 16:55:20 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Tue Aug 6 16:55:20 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                                     | 4 ++++
 src/java/org/apache/cassandra/db/compaction/CompactionTask.java | 5 +++--
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/238139cd/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 69df3de..75b349f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+1.1.next
+ * Backport compaction exception handling from 1.2
+
+
 1.1.12
  * Remove buggy thrift max message length option (CASSANDRA-5529)
  * Add retry mechanism to OTC for non-droppable_verbs (CASSANDRA-5393)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/238139cd/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
index 02d20cf..b467a2f 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
@@ -23,6 +23,7 @@ import java.io.IOException;
 import java.util.*;
 
 import com.google.common.base.Predicates;
+import com.google.common.base.Throwables;
 import com.google.common.collect.Iterators;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -188,7 +189,7 @@ public class CompactionTask extends AbstractCompactionTask
             for (SSTableWriter completedWriter : writers)
                 sstables.add(completedWriter.closeAndOpenReader(maxAge));
         }
-        catch (Exception e)
+        catch (Throwable t)
         {
             for (SSTableWriter writer : writers)
                 writer.abort();
@@ -198,7 +199,7 @@ public class CompactionTask extends AbstractCompactionTask
                 sstable.markCompacted();
                 sstable.releaseReference();
             }
-            throw FBUtilities.unchecked(e);
+            throw Throwables.propagate(t);
         }
         finally
         {


Mime
View raw message