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
main
Aaron Gao 8 years ago committed by Facebook Github Bot
parent cdad04b051
commit 0ca3ead0cb
  1. 2
      db/convenience.cc

@ -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…
Cancel
Save