This is an automated email from the ASF dual-hosted git repository.

gavinchou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 63af2cfe871 [fix](file cache) Fix BlockFileCache::get_stats (#50584)
63af2cfe871 is described below

commit 63af2cfe871d6774a59d654ebaee928862a2495a
Author: Wen Zhenghu <[email protected]>
AuthorDate: Wed May 7 00:47:49 2025 +0800

    [fix](file cache) Fix BlockFileCache::get_stats (#50584)
    
    1. use correct curr_size value for filecache statistics in
    BlockFileCache::get_stats.
    2. add warning if total size of file cache is ilegal
---
 be/src/io/cache/block_file_cache.cpp | 6 +++---
 be/src/olap/options.cpp              | 4 ++++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/be/src/io/cache/block_file_cache.cpp 
b/be/src/io/cache/block_file_cache.cpp
index 28360892177..bad789016ca 100644
--- a/be/src/io/cache/block_file_cache.cpp
+++ b/be/src/io/cache/block_file_cache.cpp
@@ -2130,7 +2130,7 @@ std::map<std::string, double> BlockFileCache::get_stats() 
{
     stats["hits_ratio_1h"] = (double)_hit_ratio_1h->get_value();
 
     stats["index_queue_max_size"] = (double)_index_queue.get_max_size();
-    stats["index_queue_curr_size"] = 
(double)_cur_index_queue_element_count_metrics->get_value();
+    stats["index_queue_curr_size"] = 
(double)_cur_index_queue_cache_size_metrics->get_value();
     stats["index_queue_max_elements"] = 
(double)_index_queue.get_max_element_size();
     stats["index_queue_curr_elements"] =
             (double)_cur_index_queue_element_count_metrics->get_value();
@@ -2142,14 +2142,14 @@ std::map<std::string, double> 
BlockFileCache::get_stats() {
             
(double)_cur_ttl_cache_lru_queue_element_count_metrics->get_value();
 
     stats["normal_queue_max_size"] = (double)_normal_queue.get_max_size();
-    stats["normal_queue_curr_size"] = 
(double)_cur_normal_queue_element_count_metrics->get_value();
+    stats["normal_queue_curr_size"] = 
(double)_cur_normal_queue_cache_size_metrics->get_value();
     stats["normal_queue_max_elements"] = 
(double)_normal_queue.get_max_element_size();
     stats["normal_queue_curr_elements"] =
             (double)_cur_normal_queue_element_count_metrics->get_value();
 
     stats["disposable_queue_max_size"] = 
(double)_disposable_queue.get_max_size();
     stats["disposable_queue_curr_size"] =
-            (double)_cur_disposable_queue_element_count_metrics->get_value();
+            (double)_cur_disposable_queue_cache_size_metrics->get_value();
     stats["disposable_queue_max_elements"] = 
(double)_disposable_queue.get_max_element_size();
     stats["disposable_queue_curr_elements"] =
             (double)_cur_disposable_queue_element_count_metrics->get_value();
diff --git a/be/src/olap/options.cpp b/be/src/olap/options.cpp
index ca1ac9e9428..bc6d5179b2f 100644
--- a/be/src/olap/options.cpp
+++ b/be/src/olap/options.cpp
@@ -239,6 +239,8 @@ Status parse_conf_cache_paths(const std::string& 
config_path, std::vector<CacheP
                 total_size = value.GetInt64();
             } else {
                 total_size = 0;
+                LOG(WARNING) << "[FileCache] the value of " << 
CACHE_TOTAL_SIZE.c_str()
+                             << " is not int64: " << value.GetString() << " , 
use 0 as default";
             }
         }
         if (config::enable_file_cache_query_limit) {
@@ -248,6 +250,8 @@ Status parse_conf_cache_paths(const std::string& 
config_path, std::vector<CacheP
                     query_limit_bytes = value.GetInt64();
                 } else {
                     query_limit_bytes = 0;
+                    LOG(WARNING) << "[FileCache] the value of " << 
CACHE_QUERY_LIMIT_SIZE.c_str()
+                                 << " is not int64: " << value.GetString() << 
" , use 0 as default";
                 }
             }
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to