[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
main
Haobo Xu 11 years ago
parent fa798e9e28
commit 200c05a23f
  1. 4
      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();

Loading…
Cancel
Save