From 200c05a23f2127495c44ad563612259ae4bd1678 Mon Sep 17 00:00:00 2001 From: Haobo Xu Date: Thu, 3 Oct 2013 14:54:20 -0700 Subject: [PATCH] [RocksDB] Still honor DisableFileDeletions when purge_log_after_memtable_flush is on Summary: as title Test Plan: make check Reviewers: emayanke Reviewed By: emayanke CC: leveldb Differential Revision: https://reviews.facebook.net/D13263 --- db/db_impl.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index 5307b9c12..f16bea5cb 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -963,7 +963,9 @@ Status DBImpl::CompactMemTable(bool* madeProgress) { // should store the file number in the shared state, and retry // However, for now, PurgeObsoleteFiles will take care of that // anyways. - if (options_.purge_log_after_memtable_flush && to_delete > 0) { + if (options_.purge_log_after_memtable_flush && + !disable_delete_obsolete_files_ && + to_delete > 0) { mutex_.Unlock(); DeleteLogFile(to_delete); mutex_.Lock();