Skip to content

Commit

Permalink
add GetRootDB() in DeleteFilesInRange
Browse files Browse the repository at this point in the history
Summary:
In case users cast a subclass of db* into dbimpl*
Closes facebook#2222

Differential Revision: D4964486

Pulled By: lightmark

fbshipit-source-id: 0ccdc08ee8e7a193dfbbe0218c3cbfd795662ca1
  • Loading branch information
lightmark authored and facebook-github-bot committed Apr 27, 2017
1 parent cdad04b commit 0ca3ead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/convenience.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<DBImpl*>(db))
return (dynamic_cast<DBImpl*>(db->GetRootDB()))
->DeleteFilesInRange(column_family, begin, end);
}

Expand Down

0 comments on commit 0ca3ead

Please sign in to comment.