DB Stress to fix a false assertion (#11164)

Summary:
Seeting this error in stress test:

db_stress: internal_repo_rocksdb/repo/db_stress_tool/db_stress_test_base.cc:2459: void rocksdb::StressTest::Open(rocksdb::SharedState *): Assertion `txn_db_ == nullptr' failed. Received signal 6 (Aborted)
......

It doesn't appear that txn_db_ is set to nullptr at all. We set ithere.

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

Test Plan: Run db_stress transaction and non-transation with low kill rate and see restarting without assertion

Reviewed By: ajkr

Differential Revision: D42855662

fbshipit-source-id: 06816d37cce9c94a81cb54ab238fb73aa102ed46
oxigraph-8.1.1
sdong 2 years ago committed by Facebook GitHub Bot
parent 24ac53d81a
commit 36174d89a6
  1. 2
      db_stress_tool/db_stress_test_base.cc

@ -2792,8 +2792,10 @@ void StressTest::Reopen(ThreadState* thread) {
} }
assert(s.ok()); assert(s.ok());
} }
assert(txn_db_ == nullptr || db_ == txn_db_);
delete db_; delete db_;
db_ = nullptr; db_ = nullptr;
txn_db_ = nullptr;
num_times_reopened_++; num_times_reopened_++;
auto now = clock_->NowMicros(); auto now = clock_->NowMicros();

Loading…
Cancel
Save