From 72c21fb3f2f3ec0b3156d04c95f36b30ca292c97 Mon Sep 17 00:00:00 2001 From: Aaron Gao Date: Mon, 24 Apr 2017 13:38:29 -0700 Subject: [PATCH] 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 --- db/convenience.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/convenience.cc b/db/convenience.cc index b1042c74d..3618e44b0 100644 --- a/db/convenience.cc +++ b/db/convenience.cc @@ -16,7 +16,7 @@ namespace rocksdb { void CancelAllBackgroundWork(DB* db, bool wait) { - (dynamic_cast(db))->CancelAllBackgroundWork(wait); + (dynamic_cast(db->GetRootDB()))->CancelAllBackgroundWork(wait); } Status DeleteFilesInRange(DB* db, ColumnFamilyHandle* column_family,