Skip to content

Commit

Permalink
No consistency check with compaction filter
Browse files Browse the repository at this point in the history
  • Loading branch information
hx235 committed Jan 25, 2024
1 parent 800cfae commit ae72042
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions db_stress_tool/no_batched_ops_stress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,11 @@ class NonBatchedOpsStressTest : public StressTest {
int error_count = 0;
// Do a consistency check between Get and MultiGet. Don't do it too
// often as it will slow db_stress down
bool do_consistency_check = thread->rand.OneIn(4);
//
// CompactionFilter can make snapshot non-repeatable by removing keys
// protected by snapshot
bool do_consistency_check =
!FLAGS_enable_compaction_filter && thread->rand.OneIn(4);

ReadOptions readoptionscopy = read_opts;

Expand Down Expand Up @@ -1071,7 +1075,10 @@ class NonBatchedOpsStressTest : public StressTest {
fault_fs_guard->DisableErrorInjection();
}

const bool check_get_entity = !error_count && thread->rand.OneIn(4);
// CompactionFilter can make snapshot non-repeatable by removing keys
// protected by snapshot
const bool check_get_entity = !FLAGS_enable_compaction_filter &&
!error_count && thread->rand.OneIn(4);

for (size_t i = 0; i < num_keys; ++i) {
const Status& s = statuses[i];
Expand Down

0 comments on commit ae72042

Please sign in to comment.