Stress test to relax the iterator verification case for lower bound (#5869)

Summary:
In stress test, all iterator verification is turned off is lower bound is enabled. This might be stricter than needed. This PR relaxes the condition and include the case where lower bound is lower than both of seek key and upper bound. It seems to work mostly fine when I run crash test locally.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5869

Test Plan: Run crash_test

Differential Revision: D18363578

fbshipit-source-id: 23d57e11ea507949b8100f4190ddfbe8db052d5a
main
sdong 5 years ago committed by Facebook Github Bot
parent 982a7532a7
commit 1da1f04231
  1. 10
      tools/db_stress_tool.cc

@ -2531,9 +2531,13 @@ class StressTest {
return; return;
} }
if (ro.iterate_lower_bound != nullptr) { if (ro.iterate_lower_bound != nullptr &&
// Lower bound would create a lot of discrepency for now so disabling (options_.comparator->Compare(*ro.iterate_lower_bound, seek_key) >= 0 ||
// the verification for now. (ro.iterate_upper_bound != nullptr &&
options_.comparator->Compare(*ro.iterate_lower_bound,
*ro.iterate_upper_bound) >= 0))) {
// Lower bound behavior is not well defined if it is larger than
// seek key or upper bound. Disable the check for now.
*diverged = true; *diverged = true;
return; return;
} }

Loading…
Cancel
Save