Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions be/src/io/cache/block_file_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ BlockFileCache::BlockFileCache(const std::string& cache_base_path,
_max_query_cache_size(cache_settings.max_query_cache_size) {
_cur_cache_size_metrics = std::make_shared<bvar::Status<size_t>>(_cache_base_path.c_str(),
"file_cache_cache_size", 0);
_cache_capacity_metrics = std::make_shared<bvar::Status<size_t>>(
_cache_base_path.c_str(), "file_cache_capacity", _capacity);
_cur_ttl_cache_size_metrics = std::make_shared<bvar::Status<size_t>>(
_cache_base_path.c_str(), "file_cache_ttl_cache_size", 0);
_cur_normal_queue_element_count_metrics = std::make_shared<bvar::Status<size_t>>(
Expand Down Expand Up @@ -1527,6 +1529,7 @@ std::string BlockFileCache::reset_capacity(size_t new_capacity) {
}
old_capacity = _capacity;
_capacity = new_capacity;
_cache_capacity_metrics->set_value(_capacity);
}
auto use_time = duration_cast<milliseconds>(steady_clock::time_point() - start_time);
LOG(INFO) << "Finish tag deleted block. path=" << _cache_base_path
Expand Down
1 change: 1 addition & 0 deletions be/src/io/cache/block_file_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ class BlockFileCache {
LRUQueue _ttl_queue;

// metrics
std::shared_ptr<bvar::Status<size_t>> _cache_capacity_metrics;
std::shared_ptr<bvar::Status<size_t>> _cur_cache_size_metrics;
std::shared_ptr<bvar::Status<size_t>> _cur_ttl_cache_size_metrics;
std::shared_ptr<bvar::Status<size_t>> _cur_ttl_cache_lru_queue_cache_size_metrics;
Expand Down