This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new 6ffd9b19a16 [fix](be) Fix file cache queue evict size metrics (#64897)
(#66069)
6ffd9b19a16 is described below
commit 6ffd9b19a168697c019531555fb7995b0f6fa8c1
Author: deardeng <[email protected]>
AuthorDate: Mon Jul 27 17:39:46 2026 +0800
[fix](be) Fix file cache queue evict size metrics (#64897) (#66069)
pick from https://github.com/apache/doris/pull/64897
---
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 414bbd56beb..282d6a1dac1 100644
--- a/be/src/io/cache/block_file_cache.cpp
+++ b/be/src/io/cache/block_file_cache.cpp
@@ -204,13 +204,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");
@@ -1729,7 +1729,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();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]