MutexLock l(&mutex_);
++disable_delete_obsolete_files_;
if (disable_delete_obsolete_files_ == 1) {
- // if not, it has already been disabled, so don't log anything
Log(options_.info_log, "File Deletions Disabled");
+ } else {
+ Log(options_.info_log,
+ "File Deletions Disabled, but already disabled. Counter: %d",
+ disable_delete_obsolete_files_);
}
return Status::OK();
}
Log(options_.info_log, "File Deletions Enabled");
should_purge_files = true;
FindObsoleteFiles(deletion_state, true);
+ } else {
+ Log(options_.info_log,
+ "File Deletions Enable, but not really enabled. Counter: %d",
+ disable_delete_obsolete_files_);
}
}
if (should_purge_files) {
// times have the same effect as calling it once.
virtual Status DisableFileDeletions() = 0;
- // Allow compactions to delete obselete files.
+ // Allow compactions to delete obsolete files.
// If force == true, the call to EnableFileDeletions() will guarantee that
// file deletions are enabled after the call, even if DisableFileDeletions()
// was called multiple times before.
s = db->GetSortedWalFiles(live_wal_files);
}
if (!s.ok()) {
- db->EnableFileDeletions();
+ db->EnableFileDeletions(false);
return s;
}
}
// we copied all the files, enable file deletions
- db->EnableFileDeletions();
+ db->EnableFileDeletions(false);
if (s.ok()) {
// move tmp private backup to real backup folder