call GetRootDB() before cast to DBImpl* in CancelAllBackgroundWork

Summary:
User could call this with wrapper class of DB or DBImpl
Closes https://github.com/facebook/rocksdb/pull/2200

Differential Revision: D4935530

Pulled By: lightmark

fbshipit-source-id: df9cb61d67d0f3bbcf62f714d77523a459a92883
main
Aaron Gao 7 years ago committed by Facebook Github Bot
parent 4c9447d889
commit 72c21fb3f2
  1. 2
      db/convenience.cc

@ -16,7 +16,7 @@
namespace rocksdb {
void CancelAllBackgroundWork(DB* db, bool wait) {
(dynamic_cast<DBImpl*>(db))->CancelAllBackgroundWork(wait);
(dynamic_cast<DBImpl*>(db->GetRootDB()))->CancelAllBackgroundWork(wait);
}
Status DeleteFilesInRange(DB* db, ColumnFamilyHandle* column_family,

Loading…
Cancel
Save