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

brandonwilliams pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit bace51ce8e24a8c6a97ac35309536e8b1c8132be
Merge: f14fa978e4 0ea1d384d4
Author: Brandon Williams <brandonwilli...@apache.org>
AuthorDate: Thu Mar 9 10:04:52 2023 -0600

    Merge branch 'cassandra-4.1' into trunk

 CHANGES.txt                                        |   1 +
 .../cassandra/service/DefaultFSErrorHandler.java   |   2 +
 ...ava => JVMStabilityInspectorThrowableTest.java} |  71 ++++++++---
 .../service/DefaultFSErrorHandlerTest.java         | 121 ++++++++++++++++++
 .../cassandra/service/DiskFailurePolicyTest.java   | 135 +++++++++++++++++++++
 .../org/apache/cassandra/utils/KillerForTests.java |   5 +
 6 files changed, 320 insertions(+), 15 deletions(-)

diff --cc 
test/distributed/org/apache/cassandra/distributed/test/JVMStabilityInspectorThrowableTest.java
index 4ca4f707d7,665d58c12a..b63179b70e
--- 
a/test/distributed/org/apache/cassandra/distributed/test/JVMStabilityInspectorThrowableTest.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/test/JVMStabilityInspectorThrowableTest.java
@@@ -40,10 -45,13 +44,12 @@@ import org.apache.cassandra.distributed
  import org.apache.cassandra.distributed.shared.AbstractBuilder;
  import org.apache.cassandra.distributed.shared.NetworkTopology;
  import org.apache.cassandra.gms.Gossiper;
+ import org.apache.cassandra.io.FSError;
+ import org.apache.cassandra.io.FSReadError;
  import org.apache.cassandra.io.sstable.CorruptSSTableException;
 +import org.apache.cassandra.io.sstable.SSTableReadsListener;
  import org.apache.cassandra.io.sstable.format.ForwardingSSTableReader;
  import org.apache.cassandra.io.sstable.format.SSTableReader;
 -import org.apache.cassandra.io.sstable.format.SSTableReadsListener;
 -import org.apache.cassandra.io.util.FileDataInput;
  import org.apache.cassandra.service.CassandraDaemon;
  import org.apache.cassandra.service.StorageService;
  import org.apache.cassandra.utils.Throwables;
@@@ -190,12 -226,27 +224,19 @@@ public class JVMStabilityInspectorThrow
          @Override
          public UnfilteredRowIterator rowIterator(DecoratedKey key, Slices 
slices, ColumnFilter selectedColumns, boolean reversed, SSTableReadsListener 
listener)
          {
-             throw throwCorrupted();
+             if (shouldThrowCorrupted)
+                 throw throwCorrupted();
+             throw throwFSError();
          }
  
 -        @Override
 -        public UnfilteredRowIterator rowIterator(FileDataInput file, 
DecoratedKey key, RowIndexEntry indexEntry, Slices slices, ColumnFilter 
selectedColumns, boolean reversed)
 -        {
 -            if (shouldThrowCorrupted)
 -                throw throwCorrupted();
 -            throw throwFSError();
 -        }
 -
          private CorruptSSTableException throwCorrupted()
          {
 -            throw new CorruptSSTableException(new IOException("failed to get 
position"), descriptor.baseFilename());
 +            throw new CorruptSSTableException(new IOException("failed to get 
position"), descriptor.baseFile());
          }
+ 
+         private FSError throwFSError()
+         {
 -            throw new FSReadError(new IOException("failed to get position"), 
descriptor.baseFilename());
++            throw new FSReadError(new IOException("failed to get position"), 
descriptor.baseFile());
+         }
      }
  }


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

Reply via email to