Skip to content

Commit

Permalink
SPDB-534: db_bench: fix rocksdb bug of last_ref assertion
Browse files Browse the repository at this point in the history
test doesnt delete db properly.
  • Loading branch information
Yuval-Ariel authored and isaac-io committed Jun 27, 2022
1 parent 148437b commit 7545b05
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/db_bench_tool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2957,7 +2957,9 @@ class Benchmark {
}

void DeleteDBs() {
db_.DeleteDBs();
if (db_.db != nullptr) {
db_.DeleteDBs();
}
for (const DBWithColumnFamilies& dbwcf : multi_dbs_) {
delete dbwcf.db;
}
Expand Down Expand Up @@ -3429,7 +3431,7 @@ class Benchmark {
}
Options options = open_options_;
for (size_t i = 0; i < multi_dbs_.size(); i++) {
delete multi_dbs_[i].db;
multi_dbs_[i].DeleteDBs();
if (!open_options_.wal_dir.empty()) {
options.wal_dir = GetPathForMultiple(open_options_.wal_dir, i);
}
Expand Down

0 comments on commit 7545b05

Please sign in to comment.