gavinchou commented on code in PR #40226: URL: https://github.com/apache/doris/pull/40226#discussion_r1741139253
########## be/src/io/cache/fs_file_cache_storage.h: ########## @@ -65,22 +65,33 @@ class FSFileCacheStorage : public FileCacheStorage { Status finalize(const FileCacheKey& key) override; Status read(const FileCacheKey& key, size_t value_offset, Slice buffer) override; Status remove(const FileCacheKey& key) override; - Status change_key_meta(const FileCacheKey& key, const KeyMeta& new_meta) override; + Status change_key_meta_type(const FileCacheKey& key, const FileCacheType type) override; + Status change_key_meta_expiration(const FileCacheKey& key, const uint64_t expiration) override; void load_blocks_directly_unlocked(BlockFileCache* _mgr, const FileCacheKey& key, std::lock_guard<std::mutex>& cache_lock) override; [[nodiscard]] static std::string get_path_in_local_cache(const std::string& dir, size_t offset, FileCacheType type, bool is_tmp = false); + [[nodiscard]] static std::string get_path_in_local_cache_old_ttl_format(const std::string& dir, + size_t offset, + FileCacheType type, + bool is_tmp = false); + [[nodiscard]] std::string get_path_in_local_cache(const UInt128Wrapper&, uint64_t expiration_time) const; private: - Status rebuild_data_structure() const; + Status upgrade_cache_dir_if_necessary() const; Status read_file_cache_version(std::string* buffer) const; + Status parse_filename_suffix_to_cache_type(const std::shared_ptr<LocalFileSystem>& fs, Review Comment: Add UT for this function -- 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