Track expected state only if expected values dir is non-empty (#10764)

Summary:
If the `-expected_values_dir` argument to db_stress is empty, then verification against expected state is effectively disabled. But `RunStressTest` still calls `TrackExpectedState`, which returns `NotSupported` causing a the crash test to fail with a false alarm. Fix it by only calling `TrackExpectedState` if necessary.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10764

Reviewed By: ajkr

Differential Revision: D39980129

Pulled By: anand1976

fbshipit-source-id: d02651746fe3a297877a4b2b2fbcb7274860f49c
main
anand76 2 years ago committed by Facebook GitHub Bot
parent 9078fcccee
commit 793fd09783
  1. 2
      db_stress_tool/db_stress_driver.cc

@ -143,7 +143,9 @@ bool RunStressTest(StressTest* stress) {
// This is after the verification step to avoid making all those `Get()`s // This is after the verification step to avoid making all those `Get()`s
// and `MultiGet()`s contend on the DB-wide trace mutex. // and `MultiGet()`s contend on the DB-wide trace mutex.
if (!FLAGS_expected_values_dir.empty()) {
stress->TrackExpectedState(&shared); stress->TrackExpectedState(&shared);
}
now = clock->NowMicros(); now = clock->NowMicros();
fprintf(stdout, "%s Starting database operations\n", fprintf(stdout, "%s Starting database operations\n",

Loading…
Cancel
Save