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:
Aaron Gao 2017-04-27 14:15:30 -07:00 committed by Facebook Github Bot
parent cdad04b051
commit 0ca3ead0cb
1 changed files with 1 additions and 1 deletions

View File

@ -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);
} }