This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new 9b18bdfcf30 branch-4.1: [fix](be) Fix file cache queue evict size
metrics #64897 (#65016)
9b18bdfcf30 is described below
commit 9b18bdfcf30b5a98c681f5d8a5c889d024a54d3c
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Jul 1 17:29:58 2026 +0800
branch-4.1: [fix](be) Fix file cache queue evict size metrics #64897
(#65016)
Cherry-picked from #64897
Co-authored-by: deardeng <[email protected]>
---
be/src/io/cache/block_file_cache.cpp | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/be/src/io/cache/block_file_cache.cpp
b/be/src/io/cache/block_file_cache.cpp
index e3c2558afa4..7ba2444ae43 100644
--- a/be/src/io/cache/block_file_cache.cpp
+++ b/be/src/io/cache/block_file_cache.cpp
@@ -205,13 +205,13 @@ BlockFileCache::BlockFileCache(const std::string&
cache_base_path,
_cur_disposable_queue_cache_size_metrics =
std::make_shared<bvar::Status<size_t>>(
_cache_base_path.c_str(),
"file_cache_disposable_queue_cache_size", 0);
- _queue_evict_size_metrics[0] = std::make_shared<bvar::Adder<size_t>>(
- _cache_base_path.c_str(), "file_cache_index_queue_evict_size");
- _queue_evict_size_metrics[1] = std::make_shared<bvar::Adder<size_t>>(
- _cache_base_path.c_str(), "file_cache_normal_queue_evict_size");
- _queue_evict_size_metrics[2] = std::make_shared<bvar::Adder<size_t>>(
+ _queue_evict_size_metrics[FileCacheType::DISPOSABLE] =
std::make_shared<bvar::Adder<size_t>>(
_cache_base_path.c_str(),
"file_cache_disposable_queue_evict_size");
- _queue_evict_size_metrics[3] = std::make_shared<bvar::Adder<size_t>>(
+ _queue_evict_size_metrics[FileCacheType::NORMAL] =
std::make_shared<bvar::Adder<size_t>>(
+ _cache_base_path.c_str(), "file_cache_normal_queue_evict_size");
+ _queue_evict_size_metrics[FileCacheType::INDEX] =
std::make_shared<bvar::Adder<size_t>>(
+ _cache_base_path.c_str(), "file_cache_index_queue_evict_size");
+ _queue_evict_size_metrics[FileCacheType::TTL] =
std::make_shared<bvar::Adder<size_t>>(
_cache_base_path.c_str(), "file_cache_ttl_cache_evict_size");
_total_evict_size_metrics = std::make_shared<bvar::Adder<size_t>>(
_cache_base_path.c_str(), "file_cache_total_evict_size");
@@ -1531,7 +1531,7 @@ void BlockFileCache::remove(FileBlockSPtr file_block, T&
cache_lock, U& block_lo
cell->file_block->get_hash_value(),
cell->file_block->offset(),
cell->size());
}
- *_queue_evict_size_metrics[static_cast<int>(file_block->cache_type())]
+ *_queue_evict_size_metrics[file_cache_type_index(file_block->cache_type())]
<< file_block->range().size();
*_total_evict_size_metrics << file_block->range().size();
if (file_block->state_unlock(block_lock) == FileBlock::State::DOWNLOADED) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]