mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-25 22:44:05 +00:00
Cleanup cf handlers before deleting db (#8564)
Summary: Delete column family handlers before deleting db to avoid `last_ref` assert. Pull Request resolved: https://github.com/facebook/rocksdb/pull/8564 Test Plan: Inject compaction test in db_stress test Reviewed By: pdillinger Differential Revision: D29797375 Pulled By: jay-zhuang fbshipit-source-id: e8baf4d279f4db5d963db95c9445454156205501
This commit is contained in:
parent
bbc85a5f22
commit
66ca5ac427
|
@ -2563,7 +2563,12 @@ void StressTest::Open() {
|
|||
s = static_cast_with_check<DBImpl>(db_->GetRootDB())
|
||||
->TEST_WaitForCompact(true);
|
||||
if (!s.ok()) {
|
||||
for (auto cf : column_families_) {
|
||||
delete cf;
|
||||
}
|
||||
column_families_.clear();
|
||||
delete db_;
|
||||
db_ = nullptr;
|
||||
}
|
||||
}
|
||||
if (!s.ok()) {
|
||||
|
|
Loading…
Reference in a new issue