This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new 0b98983b846 branch-3.0: [fix](cloud) fix BlockFileCache::get_or_set crash #44013 (#44146) 0b98983b846 is described below commit 0b98983b8465273c5e8f9bc5115d026c3520a0f3 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Wed Nov 20 09:33:42 2024 +0800 branch-3.0: [fix](cloud) fix BlockFileCache::get_or_set crash #44013 (#44146) Cherry-picked from #44013 Signed-off-by: zhengyu <zhangzhen...@selectdb.com> Co-authored-by: zhengyu <zhangzhen...@selectdb.com> --- be/src/io/cache/block_file_cache.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/be/src/io/cache/block_file_cache.cpp b/be/src/io/cache/block_file_cache.cpp index 596afb64232..ebcbe9135da 100644 --- a/be/src/io/cache/block_file_cache.cpp +++ b/be/src/io/cache/block_file_cache.cpp @@ -393,6 +393,15 @@ FileBlocks BlockFileCache::get_impl(const UInt128Wrapper& hash, const CacheConte auto& file_blocks = it->second; DCHECK(!file_blocks.empty()); + if (file_blocks.empty()) { + LOG(WARNING) << "file_blocks is empty for hash=" << hash.to_string() + << " cache type=" << context.cache_type + << " cache expiration time=" << context.expiration_time + << " cache range=" << range.left << " " << range.right + << " query id=" << context.query_id; + _files.erase(hash); + return {}; + } // change to ttl if the blocks aren't ttl if (context.cache_type == FileCacheType::TTL && _key_to_time.find(hash) == _key_to_time.end()) { for (auto& [_, cell] : file_blocks) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org