From 78f2a43d1d610cd89660195e144d022b39f5de11 Mon Sep 17 00:00:00 2001 From: Andrea Barbadoro Date: Wed, 14 Jun 2023 22:20:10 +0200 Subject: [PATCH] storage/log_manager::remove_orphan_files: error -> trace for ENOENT this function can race with segment::close before being able to call orphan_filter. this commit lowers the log level similarly to how is done in segment::close --- src/v/storage/log_manager.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/v/storage/log_manager.cc b/src/v/storage/log_manager.cc index c9d8a8e447bce..b02291ad1c15d 100644 --- a/src/v/storage/log_manager.cc +++ b/src/v/storage/log_manager.cc @@ -620,8 +620,13 @@ ss::future<> log_manager::remove_orphan_files( }) .handle_exception_type( [](std::filesystem::filesystem_error const& err) { - vlog( - stlog.error, + auto lvl = err.code() + == std::errc::no_such_file_or_directory + ? ss::log_level::trace + : ss::log_level::info; + vlogl( + stlog, + lvl, "Exception while cleaning orphan files {}", err); });