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

dcapwell 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 d2da11d  StandaloneVerifier does not fail when unable to verify 
SSTables, it only fails if Corruption is thrown
d2da11d is described below

commit d2da11d537723259f9c89d1e30ed967e0938ad60
Author: David Capwell <dcapw...@apache.org>
AuthorDate: Fri May 21 15:50:14 2021 -0700

    StandaloneVerifier does not fail when unable to verify SSTables, it only 
fails if Corruption is thrown
    
    patch by David Capwell; reviewed by Marcus Eriksson for CASSANDRA-16683
---
 CHANGES.txt                                             |  1 +
 .../org/apache/cassandra/tools/StandaloneVerifier.java  | 17 ++++-------------
 2 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 0ce3375..784c550 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.25:
+ * StandaloneVerifier does not fail when unable to verify SSTables, it only 
fails if Corruption is thrown (CASSANDRA-16683)
  * Fix bloom filter false ratio calculation by including true negatives 
(CASSANDRA-15834)
  * Prevent loss of commit log data when moving sstables between nodes 
(CASSANDRA-16619)
  * Fix materialized view builders inserting truncated data (CASSANDRA-16567)
diff --git a/src/java/org/apache/cassandra/tools/StandaloneVerifier.java 
b/src/java/org/apache/cassandra/tools/StandaloneVerifier.java
index d358882..a8e72bd 100644
--- a/src/java/org/apache/cassandra/tools/StandaloneVerifier.java
+++ b/src/java/org/apache/cassandra/tools/StandaloneVerifier.java
@@ -95,23 +95,14 @@ public class StandaloneVerifier
 
             for (SSTableReader sstable : sstables)
             {
-                try
+                try (Verifier verifier = new Verifier(cfs, sstable, handler, 
true))
                 {
-
-                    try (Verifier verifier = new Verifier(cfs, sstable, 
handler, true))
-                    {
-                        verifier.verify(extended);
-                    }
-                    catch (CorruptSSTableException cs)
-                    {
-                        System.err.println(String.format("Error verifying %s: 
%s", sstable, cs.getMessage()));
-                        hasFailed = true;
-                    }
+                    verifier.verify(extended);
                 }
                 catch (Exception e)
                 {
-                    System.err.println(String.format("Error verifying %s: %s", 
sstable, e.getMessage()));
-                    e.printStackTrace(System.err);
+                    handler.warn(String.format("Error verifying %s: %s", 
sstable, e.getMessage()), e);
+                    hasFailed = true;
                 }
             }
 

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

Reply via email to