You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sp...@apache.org on 2019/02/04 15:42:22 UTC

[cassandra] branch cassandra-3.0 updated: Catch CorruptSSTableExceptions and FSErrors in ALAExecutorService

This is an automated email from the ASF dual-hosted git repository.

spod pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-3.0 by this push:
     new c94a6aa  Catch CorruptSSTableExceptions and FSErrors in ALAExecutorService
c94a6aa is described below

commit c94a6aa7e5dd6d46f99dd07bec1645b01c5c6176
Author: Stefan Podkowinski <s....@gmail.com>
AuthorDate: Mon Feb 4 16:21:44 2019 +0100

    Catch CorruptSSTableExceptions and FSErrors in ALAExecutorService
    
    patch by Stefan Podkowinski; reviewed by Ariel Weisberg for CASSANDRA-14993
---
 CHANGES.txt                                                  |  4 ++++
 .../concurrent/AbstractLocalAwareExecutorService.java        | 12 ++++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index e3b23ee..a7e35ea 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+3.0.19
+ * Catch CorruptSSTableExceptions and FSErrors in ALAExecutorService (CASSANDRA-14993)
+
+
 3.0.18
  * Severe concurrency issues in STCS,DTCS,TWCS,TMD.Topology,TypeParser
  * Add a script to make running the cqlsh tests in cassandra repo easier (CASSANDRA-14951)
diff --git a/src/java/org/apache/cassandra/concurrent/AbstractLocalAwareExecutorService.java b/src/java/org/apache/cassandra/concurrent/AbstractLocalAwareExecutorService.java
index 6ef12d7..a2193f2 100644
--- a/src/java/org/apache/cassandra/concurrent/AbstractLocalAwareExecutorService.java
+++ b/src/java/org/apache/cassandra/concurrent/AbstractLocalAwareExecutorService.java
@@ -29,6 +29,9 @@ import java.util.concurrent.TimeoutException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.cassandra.io.FSError;
+import org.apache.cassandra.io.sstable.CorruptSSTableException;
+import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.tracing.TraceState;
 import org.apache.cassandra.tracing.Tracing;
 import org.apache.cassandra.utils.concurrent.SimpleCondition;
@@ -165,10 +168,15 @@ public abstract class AbstractLocalAwareExecutorService implements LocalAwareExe
             }
             catch (Throwable t)
             {
-                JVMStabilityInspector.inspectThrowable(t);
-                logger.warn("Uncaught exception on thread {}", Thread.currentThread(), t);
+                logger.error("Uncaught exception on thread {}", Thread.currentThread(), t);
                 result = t;
                 failure = true;
+                if (t instanceof CorruptSSTableException)
+                    FileUtils.handleCorruptSSTable((CorruptSSTableException) t);
+                else if (t instanceof FSError)
+                    FileUtils.handleFSError((FSError) t);
+                else
+                    JVMStabilityInspector.inspectThrowable(t);
             }
             finally
             {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org