catch all Throwables, not just Exceptions

This commit is contained in:
Jonathan Ellis 2013-08-06 16:55:20 -05:00
parent 155afa1b7f
commit 238139cda5
2 changed files with 7 additions and 2 deletions

View File

@ -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)

View File

@ -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
{