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
This commit is contained in:
Aaron Gao 2017-04-24 13:38:29 -07:00 committed by Facebook Github Bot
parent 4c9447d889
commit 72c21fb3f2

View File

@ -16,7 +16,7 @@
namespace rocksdb { namespace rocksdb {
void CancelAllBackgroundWork(DB* db, bool wait) { 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, Status DeleteFilesInRange(DB* db, ColumnFamilyHandle* column_family,