Cleanup multiple DBs after running db_bench in multi-DB mode (#7891)
Summary: Currently, db_bench cleanup only deletes the main DB, if there's one. Multiple DBs that are opened when --num_multi_db is specified are not deleted, which can lead to crashes due to running compaction threads on process exit. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7891 Test Plan: Run regression test Reviewed By: jay-zhuang Differential Revision: D26049914 Pulled By: anand1976 fbshipit-source-id: acef2821001ca5e208a96a6a273c724e56353316
This commit is contained in:
parent
9425acacce
commit
4ee991b1e6
@ -2784,6 +2784,9 @@ class Benchmark {
|
||||
|
||||
~Benchmark() {
|
||||
db_.DeleteDBs();
|
||||
for (auto db : multi_dbs_) {
|
||||
db.DeleteDBs();
|
||||
}
|
||||
delete prefix_extractor_;
|
||||
if (cache_.get() != nullptr) {
|
||||
// this will leak, but we're shutting down so nobody cares
|
||||
|
Loading…
x
Reference in New Issue
Block a user