From 7210d83927cbd4c92967a4464c06e7e9a8e3fb93 Mon Sep 17 00:00:00 2001 From: matthewvon Date: Mon, 22 Jul 2024 13:24:48 -0400 Subject: [PATCH] make changes to ResumeImpl() that remove calls related to EnableFileDeletions(). Following facebook/rocksdb HEAD. --- db/db_impl/db_impl.cc | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/db/db_impl/db_impl.cc b/db/db_impl/db_impl.cc index ac456ae1d..ebc86fd38 100644 --- a/db/db_impl/db_impl.cc +++ b/db/db_impl/db_impl.cc @@ -327,7 +327,6 @@ Status DBImpl::ResumeImpl(DBRecoverContext context) { } // Make sure the IO Status stored in version set is set to OK. - bool file_deletion_disabled = !IsFileDeletionsEnabled(); if (s.ok()) { IOStatus io_s = versions_->io_status(); if (io_s.IsIOError()) { @@ -413,21 +412,12 @@ Status DBImpl::ResumeImpl(DBRecoverContext context) { job_context.Clean(); if (s.ok()) { - assert(versions_->io_status().ok()); - // If we reach here, we should re-enable file deletions if it was disabled - // during previous error handling. - if (file_deletion_disabled) { - // Always return ok - s = EnableFileDeletions(/*force=*/true); - if (!s.ok()) { - ROCKS_LOG_INFO( - immutable_db_options_.info_log, - "DB resume requested but could not enable file deletions [%s]", - s.ToString().c_str()); - } - } ROCKS_LOG_INFO(immutable_db_options_.info_log, "Successfully resumed DB"); + } else { + ROCKS_LOG_INFO(immutable_db_options_.info_log, "Failed to resume DB [%s]", + s.ToString().c_str()); } + mutex_.Lock(); // Check for shutdown again before scheduling further compactions, // since we released and re-acquired the lock above