gavinchou commented on code in PR #49067:
URL: https://github.com/apache/doris/pull/49067#discussion_r2008705961


##########
cloud/src/meta-service/meta_service.h:
##########
@@ -711,6 +712,30 @@ class MetaServiceProxy final : public MetaService {
     using MetaServiceMethod = void 
(cloud::MetaService::*)(::google::protobuf::RpcController*,
                                                            const Request*, 
Response*,
                                                            
::google::protobuf::Closure*);
+    int64_t get_fdb_client_thread_busyness_percent() {
+        //auto now = steady_clock::now();
+        auto now = std::chrono::steady_clock::now();
+        auto duration_s =
+                duration_cast<std::chrono::seconds>(now - 
buyness_last_update_time_).count();
+        if (duration_s > config::bvar_qps_update_second) {
+            cache_buyness_percent_ = 
g_bvar_fdb_client_thread_busyness_percent.get_value();
+            buyness_last_update_time_ = now;
+        }
+        return cache_buyness_percent_;
+    }
+
+    int get_dynamic_retry_count() {
+        int64_t busyness_percent = get_fdb_client_thread_busyness_percent();
+        if (busyness_percent > config::retry_disable_busyness_threshold) {
+            g_bvar_busynesss_disable_counter << 1;

Review Comment:
   bvar adder should do
   promethues can process qps



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to