mirror of https://github.com/facebook/rocksdb.git
stress test verification value mismatch message (#11912)
Summary: Separate the message for value mismatch from the message for an extra value in the DB Pull Request resolved: https://github.com/facebook/rocksdb/pull/11912 Reviewed By: hx235 Differential Revision: D49792137 Pulled By: ajkr fbshipit-source-id: 311bc1801843a15367f409ead88ef755acbde468
This commit is contained in:
parent
d98a9cfb27
commit
be879cc56b
|
@ -2034,9 +2034,7 @@ class NonBatchedOpsStressTest : public StressTest {
|
|||
const Slice slice(value_from_db);
|
||||
const uint32_t value_base_from_db = GetValueBase(slice);
|
||||
if (ExpectedValueHelper::MustHaveNotExisted(expected_value,
|
||||
expected_value) ||
|
||||
!ExpectedValueHelper::InExpectedValueBaseRange(
|
||||
value_base_from_db, expected_value, expected_value)) {
|
||||
expected_value)) {
|
||||
VerificationAbort(shared, msg_prefix + ": Unexpected value found", cf,
|
||||
key, value_from_db, "");
|
||||
return false;
|
||||
|
@ -2045,6 +2043,14 @@ class NonBatchedOpsStressTest : public StressTest {
|
|||
size_t expected_value_data_size =
|
||||
GenerateValue(expected_value.GetValueBase(), expected_value_data,
|
||||
sizeof(expected_value_data));
|
||||
if (!ExpectedValueHelper::InExpectedValueBaseRange(
|
||||
value_base_from_db, expected_value, expected_value)) {
|
||||
VerificationAbort(shared, msg_prefix + ": Unexpected value found", cf,
|
||||
key, value_from_db,
|
||||
Slice(expected_value_data, expected_value_data_size));
|
||||
return false;
|
||||
}
|
||||
// TODO: are the length/memcmp() checks repetitive?
|
||||
if (value_from_db.length() != expected_value_data_size) {
|
||||
VerificationAbort(shared,
|
||||
msg_prefix + ": Length of value read is not equal",
|
||||
|
|
Loading…
Reference in New Issue