This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new af6b068ab3a branch-3.0: [Fix](filecache) Fix file cache sync clear API 
failing to delete correctly due to relative paths #50111 (#50154)
af6b068ab3a is described below

commit af6b068ab3a927bb3a03f0b213cb8079f08ae521
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Apr 18 16:13:52 2025 +0800

    branch-3.0: [Fix](filecache) Fix file cache sync clear API failing to 
delete correctly due to relative paths #50111 (#50154)
    
    Cherry-picked from #50111
    
    Co-authored-by: Gavin Chou <[email protected]>
---
 be/src/io/cache/fs_file_cache_storage.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/io/cache/fs_file_cache_storage.cpp 
b/be/src/io/cache/fs_file_cache_storage.cpp
index 68efa5a9df0..9e24970d8b3 100644
--- a/be/src/io/cache/fs_file_cache_storage.cpp
+++ b/be/src/io/cache/fs_file_cache_storage.cpp
@@ -714,7 +714,7 @@ Status FSFileCacheStorage::clear(std::string& msg) {
     for (; key_it != std::filesystem::directory_iterator(); ++key_it) {
         if (!key_it->is_directory()) continue; // all file cache data is in 
sub-directories
         ++total;
-        std::string cache_key = key_it->path().filename().native();
+        std::string cache_key = key_it->path().string();
         auto st = global_local_filesystem()->delete_directory(cache_key);
         if (st.ok()) continue;
         failed++;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to