mirror of
https://github.com/ceph/ceph
synced 2024-12-17 17:05:42 +00:00
Fixes: #7172
To ensure LevelDBStore::db is destroyed before dependent LevelDBStore::db_cache and LevelDBStore::filterpolicy. Signed-off-by: Signed-off-by: Ray Lv <xiangyulv@gmail.com>
This commit is contained in:
parent
f8fa30953e
commit
f01202de89
@ -75,6 +75,9 @@ LevelDBStore::~LevelDBStore()
|
||||
{
|
||||
close();
|
||||
delete logger;
|
||||
|
||||
// Ensure db is destroyed before dependent db_cache and filterpolicy
|
||||
db.reset();
|
||||
}
|
||||
|
||||
void LevelDBStore::close()
|
||||
|
@ -48,11 +48,11 @@ class LevelDBStore : public KeyValueDB {
|
||||
CephContext *cct;
|
||||
PerfCounters *logger;
|
||||
string path;
|
||||
boost::scoped_ptr<leveldb::DB> db;
|
||||
boost::scoped_ptr<leveldb::Cache> db_cache;
|
||||
#ifdef HAVE_LEVELDB_FILTER_POLICY
|
||||
boost::scoped_ptr<const leveldb::FilterPolicy> filterpolicy;
|
||||
#endif
|
||||
boost::scoped_ptr<leveldb::DB> db;
|
||||
|
||||
int init(ostream &out, bool create_if_missing);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user