Skip to content

Commit

Permalink
Add the check before calling verifyvaluerange
Browse files Browse the repository at this point in the history
  • Loading branch information
archang19 committed Feb 3, 2025
1 parent 64d8c83 commit 683020f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions db_stress_tool/no_batched_ops_stress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ class NonBatchedOpsStressTest : public StressTest {

s = secondary_db_->Get(options, secondary_cfhs_[cf], key, &from_db);

if (!s.ok() && IsErrorInjectedAndRetryable(s)) {
fprintf(
stdout,
"Skipping secondary verification for key because error was "
"injected into read\n");
continue;
}

assert(!pre_read_expected_values.empty() &&
static_cast<size_t>(i - start) <
pre_read_expected_values.size());
Expand All @@ -231,7 +239,6 @@ class NonBatchedOpsStressTest : public StressTest {
pre_read_expected_values[i - start]);
}
}

} else if (method == VerificationMethod::kGetEntity) {
for (int64_t i = start; i < end; ++i) {
if (thread->shared->HasVerificationFailedYet()) {
Expand Down Expand Up @@ -2966,11 +2973,7 @@ class NonBatchedOpsStressTest : public StressTest {
Slice(expected_value_data, expected_value_data_size));
return false;
}
} else if (IsErrorInjectedAndRetryable(s) {
fprintf(stdout,
"Skipping secondary verification because error was "
"injected into read\n");
} else {
} else {
VerificationAbort(
shared,
msg_prefix + ": Non-OK status" + read_u64ts.str() + s.ToString(), cf,
Expand Down

0 comments on commit 683020f

Please sign in to comment.