From 5d35f0451b8db847702f0d616e26838b907be89b Mon Sep 17 00:00:00 2001 From: jacktengg <18241664+jacktengg@users.noreply.github.com> Date: Wed, 20 Sep 2023 17:48:19 +0800 Subject: [PATCH] [fix](spill) avoid printing too much status stack trace if gc dir does not exist --- be/src/runtime/block_spill_manager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/be/src/runtime/block_spill_manager.cpp b/be/src/runtime/block_spill_manager.cpp index ad0d711c809f742..f8ee203702c2249 100644 --- a/be/src/runtime/block_spill_manager.cpp +++ b/be/src/runtime/block_spill_manager.cpp @@ -70,6 +70,11 @@ void BlockSpillManager::gc(int64_t max_file_count) { for (const auto& path : _store_paths) { std::string gc_root_dir = fmt::format("{}/{}", path.path, BLOCK_SPILL_GC_DIR); + std::error_code ec; + exists = std::filesystem::exists(gc_root_dir, ec); + if (ec || !exists) { + continue; + } std::vector dirs; auto st = io::global_local_filesystem()->list(gc_root_dir, false, &dirs, &exists); if (!st.ok()) {