freemandealer commented on code in PR #40226:
URL: https://github.com/apache/doris/pull/40226#discussion_r1740560969


##########
be/src/io/cache/fs_file_cache_storage.cpp:
##########
@@ -204,8 +205,21 @@ Status FSFileCacheStorage::change_key_meta(const 
FileCacheKey& key, const KeyMet
 
 std::string FSFileCacheStorage::get_path_in_local_cache(const std::string& 
dir, size_t offset,
                                                         FileCacheType type, 
bool is_tmp) {
-    return Path(dir) / (std::to_string(offset) +
-                        (is_tmp ? "_tmp" : 
BlockFileCache::cache_type_to_string(type)));
+    if (is_tmp) {
+        return Path(dir) / (std::to_string(offset) + "_tmp");
+    } else if (type == FileCacheType::TTL) {
+        // TTL maybe end up with '_ttl' (old format) or without (new format)
+        std::string path = Path(dir) / std::to_string(offset);
+        std::error_code ec;
+        bool exists = std::filesystem::exists(path, ec);

Review Comment:
   yes. so I change it in new commit:
   checking existence is eliminated and I use retry with oldname only in read 
IO path.



-- 
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

Reply via email to