Skip to content

Commit

Permalink
(cloud-merge) Add a check to prevent to change the same type (apache#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Lchangliang authored May 18, 2024
1 parent de2a4ab commit 454f2bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions be/src/io/cache/block_file_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ FileBlocks BlockFileCache::get_impl(const UInt128Wrapper& hash, const CacheConte
if (context.cache_type == FileCacheType::TTL && _key_to_time.find(hash) == _key_to_time.end()) {
for (auto& [_, cell] : file_blocks) {
FileCacheType origin_type = cell.file_block->cache_type();
if (origin_type == FileCacheType::TTL) continue;
Status st = cell.file_block->change_cache_type_by_mgr(FileCacheType::TTL);
if (st.ok()) {
auto& queue = get_queue(origin_type);
Expand Down

0 comments on commit 454f2bb

Please sign in to comment.