Skip to content

Commit

Permalink
DB Stress to fix a false assertion (facebook#11164)
Browse files Browse the repository at this point in the history
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: facebook#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
  • Loading branch information
siying authored and facebook-github-bot committed Jan 31, 2023
1 parent 24ac53d commit 36174d8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions db_stress_tool/db_stress_test_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2792,8 +2792,10 @@ void StressTest::Reopen(ThreadState* thread) {
}
assert(s.ok());
}
assert(txn_db_ == nullptr || db_ == txn_db_);
delete db_;
db_ = nullptr;
txn_db_ = nullptr;

num_times_reopened_++;
auto now = clock_->NowMicros();
Expand Down

0 comments on commit 36174d8

Please sign in to comment.