mirror of https://github.com/facebook/rocksdb.git
Abort verification when expected state has pending writes / db return non OK(NotFound) status (#12232)
Summary:
In the current flow, the verification will pass and continue the test when db return non Ok(NotFound) status while expected state has pending writes.
fdfd044bb2/db_stress_tool/no_batched_ops_stress.cc (L2054-L2065)
We can just abort when such a db status is ever encountered. This can prevent follow up tests like `TestCheckpoint` and `TestBackupRestore` to consider such a key as existing in the db via the `ExpectedState::Exists` API. This could be a reason for some recent test failures in this path.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/12232
Reviewed By: cbi42
Differential Revision: D52737393
Pulled By: jowlyzhang
fbshipit-source-id: f2658c5332ccd42f6190783960e2dc6fcd81ccc5
This commit is contained in:
parent
fdfd044bb2
commit
8d0c09d7e6
|
@ -2057,12 +2057,13 @@ class NonBatchedOpsStressTest : public StressTest {
|
|||
Slice slice(value_from_db);
|
||||
uint32_t value_base = GetValueBase(slice);
|
||||
shared->SyncPut(cf, key, value_base);
|
||||
return true;
|
||||
} else if (s.IsNotFound()) {
|
||||
// Value doesn't exist in db, update state to reflect that
|
||||
shared->SyncDelete(cf, key);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
char expected_value_data[kValueMaxLen];
|
||||
size_t expected_value_data_size =
|
||||
GenerateValue(expected_value.GetValueBase(), expected_value_data,
|
||||
|
|
Loading…
Reference in New Issue