mirror of https://github.com/facebook/rocksdb.git
add GetRootDB() in DeleteFilesInRange
Summary: In case users cast a subclass of db* into dbimpl* Closes https://github.com/facebook/rocksdb/pull/2222 Differential Revision: D4964486 Pulled By: lightmark fbshipit-source-id: 0ccdc08ee8e7a193dfbbe0218c3cbfd795662ca1
This commit is contained in:
parent
cdad04b051
commit
0ca3ead0cb
|
@ -21,7 +21,7 @@ void CancelAllBackgroundWork(DB* db, bool wait) {
|
||||||
|
|
||||||
Status DeleteFilesInRange(DB* db, ColumnFamilyHandle* column_family,
|
Status DeleteFilesInRange(DB* db, ColumnFamilyHandle* column_family,
|
||||||
const Slice* begin, const Slice* end) {
|
const Slice* begin, const Slice* end) {
|
||||||
return (dynamic_cast<DBImpl*>(db))
|
return (dynamic_cast<DBImpl*>(db->GetRootDB()))
|
||||||
->DeleteFilesInRange(column_family, begin, end);
|
->DeleteFilesInRange(column_family, begin, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue