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

dataroaring 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 39a6660076b [metrics](warmup) add some metrics for warmup jobs (#52991)
39a6660076b is described below

commit 39a6660076bc225bdd05b276fe983bdc28f852e7
Author: Kaijie Chen <[email protected]>
AuthorDate: Thu Aug 7 13:02:12 2025 +0800

    [metrics](warmup) add some metrics for warmup jobs (#52991)
    
    ### What problem does this PR solve?
    
    Add some metrics for warm up jobs, and fix some metrics.
    
    file_cache_once_or_periodic_warm_up_submitted_tablet_num
    file_cache_once_or_periodic_warm_up_finished_tablet_num
---
 be/src/cloud/cloud_warm_up_manager.cpp | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/be/src/cloud/cloud_warm_up_manager.cpp 
b/be/src/cloud/cloud_warm_up_manager.cpp
index 36490ee258d..6d4136b53a1 100644
--- a/be/src/cloud/cloud_warm_up_manager.cpp
+++ b/be/src/cloud/cloud_warm_up_manager.cpp
@@ -48,6 +48,10 @@ bvar::Adder<uint64_t> 
g_file_cache_event_driven_warm_up_requested_index_size(
         "file_cache_event_driven_warm_up_requested_index_size");
 bvar::Adder<uint64_t> g_file_cache_event_driven_warm_up_requested_index_num(
         "file_cache_event_driven_warm_up_requested_index_num");
+bvar::Adder<uint64_t> 
g_file_cache_once_or_periodic_warm_up_submitted_tablet_num(
+        "file_cache_once_or_periodic_warm_up_submitted_tablet_num");
+bvar::Adder<uint64_t> 
g_file_cache_once_or_periodic_warm_up_finished_tablet_num(
+        "file_cache_once_or_periodic_warm_up_finished_tablet_num");
 bvar::Adder<uint64_t> 
g_file_cache_once_or_periodic_warm_up_submitted_segment_size(
         "file_cache_once_or_periodic_warm_up_submitted_segment_size");
 bvar::Adder<uint64_t> 
g_file_cache_once_or_periodic_warm_up_submitted_segment_num(
@@ -138,9 +142,19 @@ void CloudWarmUpManager::submit_download_tasks(io::Path 
path, int64_t file_size,
                                 .is_dryrun = 
config::enable_reader_dryrun_when_download_file_cache,
                         },
                 .download_done =
-                        [wait](Status st) {
+                        [=](Status st) {
                             if (!st) {
                                 LOG_WARNING("Warm up error ").error(st);
+                            } else if (is_index) {
+                                
g_file_cache_once_or_periodic_warm_up_finished_index_num
+                                        << (offset == 0 ? 1 : 0);
+                                
g_file_cache_once_or_periodic_warm_up_finished_index_size
+                                        << current_chunk_size;
+                            } else {
+                                
g_file_cache_once_or_periodic_warm_up_finished_segment_num
+                                        << (offset == 0 ? 1 : 0);
+                                
g_file_cache_once_or_periodic_warm_up_finished_segment_size
+                                        << current_chunk_size;
                             }
                             wait->signal();
                         },
@@ -244,7 +258,7 @@ void CloudWarmUpManager::handle_jobs() {
                                 }
                             }
                             submit_download_tasks(idx_path, file_size, 
storage_resource.value()->fs,
-                                                  expiration_time, wait);
+                                                  expiration_time, wait, true);
                         }
                     } else {
                         if (schema_ptr->has_inverted_index()) {
@@ -253,11 +267,12 @@ void CloudWarmUpManager::handle_jobs() {
                             file_size = idx_file_info.has_index_size() ? 
idx_file_info.index_size()
                                                                        : -1;
                             submit_download_tasks(idx_path, file_size, 
storage_resource.value()->fs,
-                                                  expiration_time, wait);
+                                                  expiration_time, wait, true);
                         }
                     }
                 }
             }
+            g_file_cache_once_or_periodic_warm_up_finished_tablet_num << 1;
         }
 
         timespec time;
@@ -332,6 +347,7 @@ void CloudWarmUpManager::add_job(const 
std::vector<TJobMeta>& job_metas) {
         std::lock_guard lock(_mtx);
         std::for_each(job_metas.begin(), job_metas.end(), [this](const 
TJobMeta& meta) {
             _pending_job_metas.emplace_back(std::make_shared<JobMeta>(meta));
+            g_file_cache_once_or_periodic_warm_up_submitted_tablet_num << 
meta.tablet_ids.size();
         });
     }
     _cond.notify_all();


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

Reply via email to