From 0ca3ead0cb7a1554011118ecf3447b839c70caf2 Mon Sep 17 00:00:00 2001 From: Aaron Gao Date: Thu, 27 Apr 2017 14:15:30 -0700 Subject: [PATCH] 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 --- db/convenience.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/convenience.cc b/db/convenience.cc index 3618e44b0..68910508d 100644 --- a/db/convenience.cc +++ b/db/convenience.cc @@ -21,7 +21,7 @@ void CancelAllBackgroundWork(DB* db, bool wait) { Status DeleteFilesInRange(DB* db, ColumnFamilyHandle* column_family, const Slice* begin, const Slice* end) { - return (dynamic_cast(db)) + return (dynamic_cast(db->GetRootDB())) ->DeleteFilesInRange(column_family, begin, end); }