From dc8b133c44d5eca7285373cde9538a9db48a4c32 Mon Sep 17 00:00:00 2001 From: matthewvon Date: Mon, 22 Jul 2024 13:48:04 -0400 Subject: [PATCH] disable use of force parameter in EnableFileDeletions() (and remove a leftover assert) --- db/db_impl/db_impl.cc | 1 - db/db_impl/db_impl_files.cc | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/db/db_impl/db_impl.cc b/db/db_impl/db_impl.cc index ebc86fd38..787a4355f 100644 --- a/db/db_impl/db_impl.cc +++ b/db/db_impl/db_impl.cc @@ -335,7 +335,6 @@ Status DBImpl::ResumeImpl(DBRecoverContext context) { // clean-up phase MANIFEST writing. We must have also disabled file // deletions. assert(!versions_->descriptor_log_); - assert(file_deletion_disabled); // Since we are trying to recover from MANIFEST write error, we need to // switch to a new MANIFEST anyway. The old MANIFEST can be corrupted. // Therefore, force writing a dummy version edit because we do not know diff --git a/db/db_impl/db_impl_files.cc b/db/db_impl/db_impl_files.cc index 926734f38..a5c3d1f95 100644 --- a/db/db_impl/db_impl_files.cc +++ b/db/db_impl/db_impl_files.cc @@ -55,17 +55,15 @@ Status DBImpl::DisableFileDeletionsWithLock() { return Status::OK(); } -Status DBImpl::EnableFileDeletions(bool force) { +// matthewv - Jul 22, 2024 - disable "force" per rocksdb in later version +Status DBImpl::EnableFileDeletions(bool /*force*/) { // Job id == 0 means that this is not our background process, but rather // user thread JobContext job_context(0); int saved_counter; // initialize on all paths { InstrumentedMutexLock l(&mutex_); - if (force) { - // if force, we need to enable file deletions right away - disable_delete_obsolete_files_ = 0; - } else if (disable_delete_obsolete_files_ > 0) { + if (disable_delete_obsolete_files_ > 0) { --disable_delete_obsolete_files_; } saved_counter = disable_delete_obsolete_files_;