Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify values in secondary database against expected state #13281

Closed
Prev Previous commit
Next Next commit
Fix lint warning
archang19 committed Jan 23, 2025
commit dd5be01d56ce2854f734cf2c2bc6ace645fbe7ea
5 changes: 4 additions & 1 deletion db_stress_tool/no_batched_ops_stress.cc
Original file line number Diff line number Diff line change
@@ -187,6 +187,9 @@ class NonBatchedOpsStressTest : public StressTest {
s = secondary_db_->Get(options, column_families_[cf], key,
&from_db);

assert(!pre_read_expected_values.empty() &&
Copy link
Contributor Author

@archang19 archang19 Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was to get our internal code linter to stop complaining about the vector index access

static_cast<size_t>(i - start) <
pre_read_expected_values.size());
VerifyValueRange(static_cast<int>(cf), i, options, shared, from_db,
/* msg_prefix */ "Secondary get verification", s,
pre_read_expected_values[i - start]);
@@ -373,7 +376,7 @@ class NonBatchedOpsStressTest : public StressTest {
}

void ContinuouslyVerifyDb(ThreadState* thread) const override {
// Currently this method gets calleds even when
// Currently this method gets called even when
// FLAGS_continuous_verification_interval == 0 as long as
// FLAGS_verify_db_one_in > 0. Previously, this was not causing a problem in
// the crash tests since test_secondary was always equal to 0, and thus we