Skip to content

Commit

Permalink
branch-3.0: [fix](cloud) fix CHECK failed when transmit from non-TTL …
Browse files Browse the repository at this point in the history
…to normal #45057 (#45182)

Cherry-picked from #45057
  • Loading branch information
github-actions[bot] authored Dec 10, 2024
1 parent 3ce04da commit 112bbb8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions be/src/io/cache/block_file_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1093,15 +1093,16 @@ bool BlockFileCache::remove_if_ttl_file_unlock(const UInt128Wrapper& file_key, b
_key_to_time.find(file_key) != _key_to_time.end()) {
if (!remove_directly) {
for (auto& [_, cell] : _files[file_key]) {
if (cell.file_block->cache_type() == FileCacheType::TTL) {
Status st = cell.file_block->update_expiration_time(0);
if (!st.ok()) {
LOG_WARNING("Failed to update expiration time to 0").error(st);
}
if (cell.file_block->cache_type() != FileCacheType::TTL) {
continue;
}
Status st = cell.file_block->update_expiration_time(0);
if (!st.ok()) {
LOG_WARNING("Failed to update expiration time to 0").error(st);
}

if (cell.file_block->cache_type() == FileCacheType::NORMAL) continue;
auto st = cell.file_block->change_cache_type_between_ttl_and_others(
st = cell.file_block->change_cache_type_between_ttl_and_others(
FileCacheType::NORMAL);
if (st.ok()) {
if (cell.queue_iterator) {
Expand Down

0 comments on commit 112bbb8

Please sign in to comment.