@ -216,7 +216,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWriteRetryableError) {
[ & ] ( void * ) { fault_fs_ - > SetFilesystemActive ( false , error_msg ) ; } ) ;
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
SyncPoint : : GetInstance ( ) - > DisableProcessing ( ) ;
fault_fs_ - > SetFilesystemActive ( true ) ;
s = dbfull ( ) - > Resume ( ) ;
@ -242,7 +242,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWriteRetryableError) {
[ & ] ( void * ) { fault_fs_ - > SetFilesystemActive ( false , error_msg ) ; } ) ;
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
SyncPoint : : GetInstance ( ) - > DisableProcessing ( ) ;
fault_fs_ - > SetFilesystemActive ( true ) ;
s = dbfull ( ) - > Resume ( ) ;
@ -256,7 +256,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWriteRetryableError) {
[ & ] ( void * ) { fault_fs_ - > SetFilesystemActive ( false , error_msg ) ; } ) ;
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
SyncPoint : : GetInstance ( ) - > DisableProcessing ( ) ;
fault_fs_ - > SetFilesystemActive ( true ) ;
s = dbfull ( ) - > Resume ( ) ;
@ -292,7 +292,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWriteFileScopeError) {
[ & ] ( void * ) { fault_fs_ - > SetFilesystemActive ( false , error_msg ) ; } ) ;
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
SyncPoint : : GetInstance ( ) - > DisableProcessing ( ) ;
fault_fs_ - > SetFilesystemActive ( true ) ;
s = dbfull ( ) - > Resume ( ) ;
@ -306,7 +306,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWriteFileScopeError) {
[ & ] ( void * ) { fault_fs_ - > SetFilesystemActive ( false , error_msg ) ; } ) ;
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
SyncPoint : : GetInstance ( ) - > DisableProcessing ( ) ;
fault_fs_ - > SetFilesystemActive ( true ) ;
s = dbfull ( ) - > Resume ( ) ;
@ -320,7 +320,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWriteFileScopeError) {
[ & ] ( void * ) { fault_fs_ - > SetFilesystemActive ( false , error_msg ) ; } ) ;
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
SyncPoint : : GetInstance ( ) - > DisableProcessing ( ) ;
fault_fs_ - > SetFilesystemActive ( true ) ;
s = dbfull ( ) - > Resume ( ) ;
@ -340,7 +340,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWriteFileScopeError) {
[ & ] ( void * ) { fault_fs_ - > SetFilesystemActive ( false , error_msg ) ; } ) ;
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
SyncPoint : : GetInstance ( ) - > DisableProcessing ( ) ;
fault_fs_ - > SetFilesystemActive ( true ) ;
s = dbfull ( ) - > Resume ( ) ;
@ -649,7 +649,7 @@ TEST_F(DBErrorHandlingFSTest, ManifestWriteRetryableError) {
[ & ] ( void * ) { fault_fs_ - > SetFilesystemActive ( false , error_msg ) ; } ) ;
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
SyncPoint : : GetInstance ( ) - > ClearAllCallBacks ( ) ;
SyncPoint : : GetInstance ( ) - > DisableProcessing ( ) ;
fault_fs_ - > SetFilesystemActive ( true ) ;
@ -695,7 +695,7 @@ TEST_F(DBErrorHandlingFSTest, ManifestWriteFileScopeError) {
[ & ] ( void * ) { fault_fs_ - > SetFilesystemActive ( false , error_msg ) ; } ) ;
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
SyncPoint : : GetInstance ( ) - > ClearAllCallBacks ( ) ;
SyncPoint : : GetInstance ( ) - > DisableProcessing ( ) ;
fault_fs_ - > SetFilesystemActive ( true ) ;
@ -1698,7 +1698,7 @@ TEST_F(DBErrorHandlingFSTest, MultiDBVariousErrors) {
// to soft error and trigger auto resume. During auto resume, SwitchMemtable
// is disabled to avoid small SST tables. Write can still be applied before
// the bg error is cleaned unless the memtable is full.
TEST_F ( DBErrorHandlingFSTest , FLushWritNoWALRetryablee ErrorAutoRecover1 ) {
TEST_F ( DBErrorHandlingFSTest , FLushWritNoWALRetryableErrorAutoRecover1 ) {
// Activate the FS before the first resume
std : : shared_ptr < ErrorHandlerFSListener > listener (
new ErrorHandlerFSListener ( ) ) ;
@ -1768,7 +1768,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWritNoWALRetryableeErrorAutoRecover1) {
Destroy ( options ) ;
}
TEST_F ( DBErrorHandlingFSTest , FLushWritNoWALRetryablee ErrorAutoRecover2 ) {
TEST_F ( DBErrorHandlingFSTest , FLushWritNoWALRetryableErrorAutoRecover2 ) {
// Activate the FS before the first resume
std : : shared_ptr < ErrorHandlerFSListener > listener (
new ErrorHandlerFSListener ( ) ) ;
@ -1810,14 +1810,14 @@ TEST_F(DBErrorHandlingFSTest, FLushWritNoWALRetryableeErrorAutoRecover2) {
ERROR_HANDLER_BG_RETRYABLE_IO_ERROR_COUNT ) ) ;
ASSERT_EQ ( 1 , options . statistics - > getAndResetTickerCount (
ERROR_HANDLER_AUTORESUME_COUNT ) ) ;
ASSERT_EQ ( 1 , options . statistics - > getAndResetTickerCount (
ASSERT_LE ( 0 , options . statistics - > getAndResetTickerCount (
ERROR_HANDLER_AUTORESUME_RETRY_TOTAL_COUNT ) ) ;
ASSERT_EQ ( 1 , options . statistics - > getAndResetTickerCount (
ASSERT_LE ( 0 , options . statistics - > getAndResetTickerCount (
ERROR_HANDLER_AUTORESUME_SUCCESS_COUNT ) ) ;
HistogramData autoresume_retry ;
options . statistics - > histogramData ( ERROR_HANDLER_AUTORESUME_RETRY_COUNT ,
& autoresume_retry ) ;
ASSERT_EQ ( autoresume_retry . max , 1 ) ;
ASSERT_G E ( autoresume_retry . max , 0 ) ;
ASSERT_OK ( Put ( Key ( 2 ) , " val2 " , wo ) ) ;
s = Flush ( ) ;
// Since auto resume is successful, the bg error is cleaned, flush will
@ -1827,7 +1827,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWritNoWALRetryableeErrorAutoRecover2) {
Destroy ( options ) ;
}
TEST_F ( DBErrorHandlingFSTest , DISABLED_FLushWritRetryablee ErrorAutoRecover1 ) {
TEST_F ( DBErrorHandlingFSTest , DISABLED_FLushWritRetryableErrorAutoRecover1 ) {
// Fail the first resume and make the second resume successful
std : : shared_ptr < ErrorHandlerFSListener > listener (
new ErrorHandlerFSListener ( ) ) ;
@ -1876,7 +1876,7 @@ TEST_F(DBErrorHandlingFSTest, DISABLED_FLushWritRetryableeErrorAutoRecover1) {
Destroy ( options ) ;
}
TEST_F ( DBErrorHandlingFSTest , FLushWritRetryablee ErrorAutoRecover2 ) {
TEST_F ( DBErrorHandlingFSTest , FLushWritRetryableErrorAutoRecover2 ) {
// Activate the FS before the first resume
std : : shared_ptr < ErrorHandlerFSListener > listener (
new ErrorHandlerFSListener ( ) ) ;
@ -1901,7 +1901,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWritRetryableeErrorAutoRecover2) {
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
SyncPoint : : GetInstance ( ) - > DisableProcessing ( ) ;
fault_fs_ - > SetFilesystemActive ( true ) ;
ASSERT_EQ ( listener - > WaitForRecovery ( 5000000 ) , true ) ;
@ -1916,7 +1916,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWritRetryableeErrorAutoRecover2) {
Destroy ( options ) ;
}
TEST_F ( DBErrorHandlingFSTest , FLushWritRetryablee ErrorAutoRecover3 ) {
TEST_F ( DBErrorHandlingFSTest , FLushWritRetryableErrorAutoRecover3 ) {
// Fail all the resume and let user to resume
std : : shared_ptr < ErrorHandlerFSListener > listener (
new ErrorHandlerFSListener ( ) ) ;
@ -1945,7 +1945,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWritRetryableeErrorAutoRecover3) {
[ & ] ( void * ) { fault_fs_ - > SetFilesystemActive ( false , error_msg ) ; } ) ;
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
TEST_SYNC_POINT ( " FLushWritRetryableeErrorAutoRecover3:0 " ) ;
TEST_SYNC_POINT ( " FLushWritRetryableeErrorAutoRecover3:1 " ) ;
fault_fs_ - > SetFilesystemActive ( true ) ;
@ -1965,7 +1965,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWritRetryableeErrorAutoRecover3) {
Destroy ( options ) ;
}
TEST_F ( DBErrorHandlingFSTest , DISABLED_FLushWritRetryablee ErrorAutoRecover4 ) {
TEST_F ( DBErrorHandlingFSTest , DISABLED_FLushWritRetryableErrorAutoRecover4 ) {
// Fail the first resume and does not do resume second time because
// the IO error severity is Fatal Error and not Retryable.
std : : shared_ptr < ErrorHandlerFSListener > listener (
@ -2001,7 +2001,7 @@ TEST_F(DBErrorHandlingFSTest, DISABLED_FLushWritRetryableeErrorAutoRecover4) {
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
TEST_SYNC_POINT ( " FLushWritRetryableeErrorAutoRecover4:0 " ) ;
TEST_SYNC_POINT ( " FLushWritRetryableeErrorAutoRecover4:2 " ) ;
ROCKSDB_NAMESPACE : : SyncPoint : : GetInstance ( ) - > ClearAllCallBacks ( ) ;
@ -2025,7 +2025,7 @@ TEST_F(DBErrorHandlingFSTest, DISABLED_FLushWritRetryableeErrorAutoRecover4) {
Destroy ( options ) ;
}
TEST_F ( DBErrorHandlingFSTest , DISABLED_FLushWritRetryablee ErrorAutoRecover5 ) {
TEST_F ( DBErrorHandlingFSTest , DISABLED_FLushWritRetryableErrorAutoRecover5 ) {
// During the resume, call DB->CLose, make sure the resume thread exist
// before close continues. Due to the shutdown, the resume is not successful
// and the FS does not become active, so close status is still IO error
@ -2054,7 +2054,7 @@ TEST_F(DBErrorHandlingFSTest, DISABLED_FLushWritRetryableeErrorAutoRecover5) {
[ & ] ( void * ) { fault_fs_ - > SetFilesystemActive ( false , error_msg ) ; } ) ;
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
TEST_SYNC_POINT ( " FLushWritRetryableeErrorAutoRecover5:0 " ) ;
// The first resume will cause recovery_error and its severity is the
// Fatal error
@ -2074,7 +2074,7 @@ TEST_F(DBErrorHandlingFSTest, DISABLED_FLushWritRetryableeErrorAutoRecover5) {
Destroy ( options ) ;
}
TEST_F ( DBErrorHandlingFSTest , FLushWritRetryableeErrorAutoRecover6 ) {
TEST_F ( DBErrorHandlingFSTest , DISABLED_ FLushWritRetryableeErrorAutoRecover6) {
// During the resume, call DB->CLose, make sure the resume thread exist
// before close continues. Due to the shutdown, the resume is not successful
// and the FS does not become active, so close status is still IO error
@ -2109,7 +2109,7 @@ TEST_F(DBErrorHandlingFSTest, FLushWritRetryableeErrorAutoRecover6) {
[ & ] ( void * ) { fault_fs_ - > SetFilesystemActive ( false , error_msg ) ; } ) ;
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
TEST_SYNC_POINT ( " FLushWritRetryableeErrorAutoRecover6:0 " ) ;
TEST_SYNC_POINT ( " FLushWritRetryableeErrorAutoRecover6:1 " ) ;
fault_fs_ - > SetFilesystemActive ( true ) ;
@ -2168,7 +2168,7 @@ TEST_F(DBErrorHandlingFSTest, ManifestWriteRetryableErrorAutoRecover) {
[ & ] ( void * ) { fault_fs_ - > SetFilesystemActive ( false , error_msg ) ; } ) ;
SyncPoint : : GetInstance ( ) - > EnableProcessing ( ) ;
s = Flush ( ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kHard Error ) ;
ASSERT_EQ ( s . severity ( ) , ROCKSDB_NAMESPACE : : Status : : Severity : : kSoft Error ) ;
TEST_SYNC_POINT ( " ManifestWriteRetryableErrorAutoRecover:0 " ) ;
fault_fs_ - > SetFilesystemActive ( true ) ;
ROCKSDB_NAMESPACE : : SyncPoint : : GetInstance ( ) - > ClearAllCallBacks ( ) ;