freemandealer commented on code in PR #50726: URL: https://github.com/apache/doris/pull/50726#discussion_r2099569738
########## be/src/io/cache/fs_file_cache_storage.cpp: ########## @@ -307,6 +328,98 @@ std::string FSFileCacheStorage::get_path_in_local_cache(const UInt128Wrapper& va } } +void FSFileCacheStorage::remove_old_version_directories() { + std::error_code ec; + std::filesystem::directory_iterator key_it {_cache_base_path, ec}; + if (ec) { + LOG(WARNING) << "Failed to list directory: " << _cache_base_path + << ", error: " << ec.message(); + return; + } + + std::vector<std::filesystem::path> file_list; + // the dir is concurrently accessed, so handle invalid iter with retry + bool success = false; + size_t retry_count = 0; + const size_t max_retry = 30; Review Comment: 5 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org