From 5f62d0ed837b6c71c37a658af2099de187f41cde Mon Sep 17 00:00:00 2001 From: Qi Xu Date: Thu, 15 Feb 2024 18:54:07 -0800 Subject: [PATCH] add wal close log Signed-off-by: Qi Xu --- db/db_impl/db_impl_files.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/db_impl/db_impl_files.cc b/db/db_impl/db_impl_files.cc index 1db50b476d2..3dd0533e5c6 100644 --- a/db/db_impl/db_impl_files.cc +++ b/db/db_impl/db_impl_files.cc @@ -317,6 +317,8 @@ void DBImpl::FindObsoleteFiles(JobContext* job_context, bool force, // logs_ could have changed while we were waiting. continue; } + ROCKS_LOG_INFO(immutable_db_options_.info_log, + "deleting log %" PRIu64 " from logs_\n", log.number); logs_to_free_.push_back(log.ReleaseWriter()); logs_.pop_front(); } @@ -491,6 +493,8 @@ void DBImpl::PurgeObsoleteFiles(JobContext& state, bool schedule_only) { // Close WALs before trying to delete them. for (const auto w : state.logs_to_free) { // TODO: maybe check the return value of Close. + ROCKS_LOG_INFO(immutable_db_options_.info_log, + "Close log %" PRIu64 " from logs_\n", w->get_log_number()); auto s = w->Close(); s.PermitUncheckedError(); }