Avoid overwriting first non-OK Status in db_stress setup (#8907)

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

Reviewed By: zhichao-cao

Differential Revision: D30922081

Pulled By: ajkr

fbshipit-source-id: ad7a32c21d0049342fd20c9b7f555e93674c3671
main
Andrew Kryczka 3 years ago committed by Facebook GitHub Bot
parent 7743f033b1
commit 5c92aa38ea
  1. 5
      db_stress_tool/db_stress_test_base.cc

@ -2643,7 +2643,7 @@ void StressTest::Open() {
assert(!s.ok() || column_families_.size() ==
static_cast<size_t>(FLAGS_column_families));
if (FLAGS_test_secondary) {
if (s.ok() && FLAGS_test_secondary) {
#ifndef ROCKSDB_LITE
secondaries_.resize(FLAGS_threads);
std::fill(secondaries_.begin(), secondaries_.end(), nullptr);
@ -2664,13 +2664,12 @@ void StressTest::Open() {
break;
}
}
assert(s.ok());
#else
fprintf(stderr, "Secondary is not supported in RocksDBLite\n");
exit(1);
#endif
}
if (FLAGS_continuous_verification_interval > 0 && !cmp_db_) {
if (s.ok() && FLAGS_continuous_verification_interval > 0 && !cmp_db_) {
Options tmp_opts;
// TODO(yanqin) support max_open_files != -1 for secondary instance.
tmp_opts.max_open_files = -1;

Loading…
Cancel
Save