@ -552,9 +552,19 @@ class NonBatchedOpsStressTest : public StressTest {
}
}
shared - > Put ( rand_column_family , rand_key , value_base , false /* pending */ ) ;
shared - > Put ( rand_column_family , rand_key , value_base , false /* pending */ ) ;
if ( ! s . ok ( ) ) {
if ( ! s . ok ( ) ) {
if ( FLAGS_injest_error_severity > = 2 ) {
if ( ! is_db_stopped_ & & s . severity ( ) > = Status : : Severity : : kFatalError ) {
is_db_stopped_ = true ;
} else if ( ! is_db_stopped_ | |
s . severity ( ) < Status : : Severity : : kFatalError ) {
fprintf ( stderr , " put or merge error: %s \n " , s . ToString ( ) . c_str ( ) ) ;
fprintf ( stderr , " put or merge error: %s \n " , s . ToString ( ) . c_str ( ) ) ;
std : : terminate ( ) ;
std : : terminate ( ) ;
}
}
} else {
fprintf ( stderr , " put or merge error: %s \n " , s . ToString ( ) . c_str ( ) ) ;
std : : terminate ( ) ;
}
}
thread - > stats . AddBytesForWrites ( 1 , sz ) ;
thread - > stats . AddBytesForWrites ( 1 , sz ) ;
PrintKeyValue ( rand_column_family , static_cast < uint32_t > ( rand_key ) , value ,
PrintKeyValue ( rand_column_family , static_cast < uint32_t > ( rand_key ) , value ,
sz ) ;
sz ) ;
@ -615,9 +625,20 @@ class NonBatchedOpsStressTest : public StressTest {
shared - > Delete ( rand_column_family , rand_key , false /* pending */ ) ;
shared - > Delete ( rand_column_family , rand_key , false /* pending */ ) ;
thread - > stats . AddDeletes ( 1 ) ;
thread - > stats . AddDeletes ( 1 ) ;
if ( ! s . ok ( ) ) {
if ( ! s . ok ( ) ) {
if ( FLAGS_injest_error_severity > = 2 ) {
if ( ! is_db_stopped_ & &
s . severity ( ) > = Status : : Severity : : kFatalError ) {
is_db_stopped_ = true ;
} else if ( ! is_db_stopped_ | |
s . severity ( ) < Status : : Severity : : kFatalError ) {
fprintf ( stderr , " delete error: %s \n " , s . ToString ( ) . c_str ( ) ) ;
fprintf ( stderr , " delete error: %s \n " , s . ToString ( ) . c_str ( ) ) ;
std : : terminate ( ) ;
std : : terminate ( ) ;
}
}
} else {
fprintf ( stderr , " delete error: %s \n " , s . ToString ( ) . c_str ( ) ) ;
std : : terminate ( ) ;
}
}
} else {
} else {
shared - > SingleDelete ( rand_column_family , rand_key , true /* pending */ ) ;
shared - > SingleDelete ( rand_column_family , rand_key , true /* pending */ ) ;
if ( ! FLAGS_use_txn ) {
if ( ! FLAGS_use_txn ) {
@ -637,9 +658,20 @@ class NonBatchedOpsStressTest : public StressTest {
shared - > SingleDelete ( rand_column_family , rand_key , false /* pending */ ) ;
shared - > SingleDelete ( rand_column_family , rand_key , false /* pending */ ) ;
thread - > stats . AddSingleDeletes ( 1 ) ;
thread - > stats . AddSingleDeletes ( 1 ) ;
if ( ! s . ok ( ) ) {
if ( ! s . ok ( ) ) {
if ( FLAGS_injest_error_severity > = 2 ) {
if ( ! is_db_stopped_ & &
s . severity ( ) > = Status : : Severity : : kFatalError ) {
is_db_stopped_ = true ;
} else if ( ! is_db_stopped_ | |
s . severity ( ) < Status : : Severity : : kFatalError ) {
fprintf ( stderr , " single delete error: %s \n " , s . ToString ( ) . c_str ( ) ) ;
fprintf ( stderr , " single delete error: %s \n " , s . ToString ( ) . c_str ( ) ) ;
std : : terminate ( ) ;
std : : terminate ( ) ;
}
}
} else {
fprintf ( stderr , " single delete error: %s \n " , s . ToString ( ) . c_str ( ) ) ;
std : : terminate ( ) ;
}
}
}
}
return s ;
return s ;
}
}
@ -684,9 +716,19 @@ class NonBatchedOpsStressTest : public StressTest {
Slice end_key = end_keystr ;
Slice end_key = end_keystr ;
Status s = db_ - > DeleteRange ( write_opts , cfh , key , end_key ) ;
Status s = db_ - > DeleteRange ( write_opts , cfh , key , end_key ) ;
if ( ! s . ok ( ) ) {
if ( ! s . ok ( ) ) {
if ( FLAGS_injest_error_severity > = 2 ) {
if ( ! is_db_stopped_ & & s . severity ( ) > = Status : : Severity : : kFatalError ) {
is_db_stopped_ = true ;
} else if ( ! is_db_stopped_ | |
s . severity ( ) < Status : : Severity : : kFatalError ) {
fprintf ( stderr , " delete range error: %s \n " , s . ToString ( ) . c_str ( ) ) ;
fprintf ( stderr , " delete range error: %s \n " , s . ToString ( ) . c_str ( ) ) ;
std : : terminate ( ) ;
std : : terminate ( ) ;
}
}
} else {
fprintf ( stderr , " delete range error: %s \n " , s . ToString ( ) . c_str ( ) ) ;
std : : terminate ( ) ;
}
}
int covered = shared - > DeleteRange ( rand_column_family , rand_key ,
int covered = shared - > DeleteRange ( rand_column_family , rand_key ,
rand_key + FLAGS_range_deletion_width ,
rand_key + FLAGS_range_deletion_width ,
false /* pending */ ) ;
false /* pending */ ) ;