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

morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new 3a1b09e2167 branch-3.1: [bvar](cloud-mow) Add bvar for mow compaction 
get delete bitmap lock backoff sleep time #52044 (#52289)
3a1b09e2167 is described below

commit 3a1b09e21673b368867329cbfbc5c4ea30267530
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Jun 26 11:59:49 2025 +0800

    branch-3.1: [bvar](cloud-mow) Add bvar for mow compaction get delete bitmap 
lock backoff sleep time #52044 (#52289)
    
    Cherry-picked from #52044
    
    Co-authored-by: bobhan1 <[email protected]>
---
 be/src/cloud/cloud_meta_mgr.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/be/src/cloud/cloud_meta_mgr.cpp b/be/src/cloud/cloud_meta_mgr.cpp
index 5e959f59894..62c68b5379f 100644
--- a/be/src/cloud/cloud_meta_mgr.cpp
+++ b/be/src/cloud/cloud_meta_mgr.cpp
@@ -139,6 +139,8 @@ bvar::LatencyRecorder 
g_cloud_commit_txn_resp_redirect_latency("cloud_table_stat
 bvar::Adder<uint64_t> 
g_cloud_meta_mgr_rpc_timeout_count("cloud_meta_mgr_rpc_timeout_count");
 bvar::Window<bvar::Adder<uint64_t>> g_cloud_ms_rpc_timeout_count_window(
         "cloud_meta_mgr_rpc_timeout_qps", &g_cloud_meta_mgr_rpc_timeout_count, 
30);
+bvar::LatencyRecorder g_cloud_be_mow_get_dbm_lock_backoff_sleep_time(
+        "cloud_be_mow_get_dbm_lock_backoff_sleep_time");
 
 class MetaServiceProxy {
 public:
@@ -1396,6 +1398,7 @@ Status CloudMetaMgr::get_delete_bitmap_update_lock(const 
CloudTablet& tablet, in
     Status st;
     std::default_random_engine rng = make_random_engine();
     std::uniform_int_distribution<uint32_t> u(500, 2000);
+    uint64_t backoff_sleep_time_ms {0};
     do {
         bool test_conflict = false;
         st = retry_rpc("get delete bitmap update lock", req, &res,
@@ -1410,8 +1413,12 @@ Status CloudMetaMgr::get_delete_bitmap_update_lock(const 
CloudTablet& tablet, in
         LOG(WARNING) << "get delete bitmap lock conflict. " << debug_info(req)
                      << " retry_times=" << retry_times << " sleep=" << 
duration_ms
                      << "ms : " << res.status().msg();
+        auto start = std::chrono::steady_clock::now();
         bthread_usleep(duration_ms * 1000);
+        auto end = std::chrono::steady_clock::now();
+        backoff_sleep_time_ms += duration_cast<std::chrono::milliseconds>(end 
- start).count();
     } while (++retry_times <= config::get_delete_bitmap_lock_max_retry_times);
+    g_cloud_be_mow_get_dbm_lock_backoff_sleep_time << backoff_sleep_time_ms;
     DBUG_EXECUTE_IF("CloudMetaMgr.get_delete_bitmap_update_lock.inject_sleep", 
{
         auto p = dp->param("percent", 0.01);
         // 100s > Config.calculate_delete_bitmap_task_timeout_seconds = 60s


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

Reply via email to