gavinchou commented on code in PR #38811:
URL: https://github.com/apache/doris/pull/38811#discussion_r1770843816


##########
be/src/io/cache/block_file_cache_factory.cpp:
##########
@@ -63,32 +63,45 @@ size_t FileCacheFactory::try_release(const std::string& 
base_path) {
 
 Status FileCacheFactory::create_file_cache(const std::string& cache_base_path,
                                            FileCacheSettings 
file_cache_settings) {
-    const auto& fs = global_local_filesystem();
-    bool exists = false;
-    RETURN_IF_ERROR(fs->exists(cache_base_path, &exists));
-    if (!exists) {
-        auto st = fs->create_directory(cache_base_path);
-        LOG(INFO) << "path " << cache_base_path << " does not exist, create " 
<< st.msg();
-        RETURN_IF_ERROR(st);
-    } else if (config::clear_file_cache) {
-        RETURN_IF_ERROR(fs->delete_directory(cache_base_path));
-        RETURN_IF_ERROR(fs->create_directory(cache_base_path));
-    }
+    if (file_cache_settings.storage == "memory") {

Review Comment:
   make "memory"  and "disk" contants in class FileCacheStorage



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to