luozenglin commented on code in PR #15114: URL: https://github.com/apache/doris/pull/15114#discussion_r1052154527
########## be/src/io/cache/file_cache.cpp: ########## @@ -87,32 +89,103 @@ Status FileCache::download_cache_to_local(const Path& cache_file, const Path& ca return Status::OK(); } -Status FileCache::_remove_file(const Path& cache_file, const Path& cache_done_file, - size_t* cleaned_size) { - bool done_file_exist = false; - RETURN_NOT_OK_STATUS_WITH_WARN( - io::global_local_filesystem()->exists(cache_done_file, &done_file_exist), - "Check local done file exist failed."); - if (done_file_exist) { - RETURN_NOT_OK_STATUS_WITH_WARN( - io::global_local_filesystem()->delete_file(cache_done_file), - fmt::format("Delete local done file failed: {}", cache_done_file.native())); - } +Status FileCache::_remove_file(const Path& file, size_t* cleaned_size) { bool cache_file_exist = false; - RETURN_NOT_OK_STATUS_WITH_WARN( - io::global_local_filesystem()->exists(cache_file, &cache_file_exist), - "Check local cache file exist failed."); + RETURN_NOT_OK_STATUS_WITH_WARN(io::global_local_filesystem()->exists(file, &cache_file_exist), + "Check local cache file exist failed."); if (cache_file_exist) { if (cleaned_size) { RETURN_NOT_OK_STATUS_WITH_WARN( - io::global_local_filesystem()->file_size(cache_file, cleaned_size), - fmt::format("get local cache file size failed: {}", cache_file.native())); + io::global_local_filesystem()->file_size(file, cleaned_size), + fmt::format("get local cache file size failed: {}", file.native())); } RETURN_NOT_OK_STATUS_WITH_WARN( - io::global_local_filesystem()->delete_file(cache_file), - fmt::format("Delete local cache file failed: {}", cache_file.native())); + io::global_local_filesystem()->delete_file(file), + fmt::format("Delete local cache file failed: {}", file.native())); + } + LOG(INFO) << "Delete local cache file successfully: " << file.native(); Review Comment: done -- 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