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 d1bf328c91a [improve](cloud) adjust timeout settings for BE brpc connection pool to meta-service (#44374) d1bf328c91a is described below commit d1bf328c91ae91324241166a7059cbe420630612 Author: Luwei <lu...@selectdb.com> AuthorDate: Mon Nov 25 23:33:19 2024 +0800 [improve](cloud) adjust timeout settings for BE brpc connection pool to meta-service (#44374) --- be/src/cloud/cloud_meta_mgr.cpp | 8 ++++---- be/src/cloud/config.cpp | 2 +- be/src/cloud/config.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/be/src/cloud/cloud_meta_mgr.cpp b/be/src/cloud/cloud_meta_mgr.cpp index 5142d897475..8e21498b0d8 100644 --- a/be/src/cloud/cloud_meta_mgr.cpp +++ b/be/src/cloud/cloud_meta_mgr.cpp @@ -243,12 +243,12 @@ private: long deadline = now; // connection age only works without list endpoint. if (!is_meta_service_endpoint_list && - config::meta_service_connection_age_base_minutes > 0) { + config::meta_service_connection_age_base_seconds > 0) { std::default_random_engine rng(static_cast<uint32_t>(now)); std::uniform_int_distribution<> uni( - config::meta_service_connection_age_base_minutes, - config::meta_service_connection_age_base_minutes * 2); - deadline = now + duration_cast<milliseconds>(minutes(uni(rng))).count(); + config::meta_service_connection_age_base_seconds, + config::meta_service_connection_age_base_seconds * 2); + deadline = now + duration_cast<milliseconds>(seconds(uni(rng))).count(); } else { deadline = LONG_MAX; } diff --git a/be/src/cloud/config.cpp b/be/src/cloud/config.cpp index 32e3250f87c..e95c295ae1d 100644 --- a/be/src/cloud/config.cpp +++ b/be/src/cloud/config.cpp @@ -28,7 +28,7 @@ DEFINE_Bool(meta_service_use_load_balancer, "false"); DEFINE_mInt32(meta_service_rpc_timeout_ms, "10000"); DEFINE_Bool(meta_service_connection_pooled, "true"); DEFINE_mInt64(meta_service_connection_pool_size, "20"); -DEFINE_mInt32(meta_service_connection_age_base_minutes, "5"); +DEFINE_mInt32(meta_service_connection_age_base_seconds, "30"); DEFINE_mInt32(meta_service_idle_connection_timeout_ms, "0"); DEFINE_mInt32(meta_service_rpc_retry_times, "200"); DEFINE_mInt32(meta_service_brpc_timeout_ms, "10000"); diff --git a/be/src/cloud/config.h b/be/src/cloud/config.h index 8af967afb8c..b345e635592 100644 --- a/be/src/cloud/config.h +++ b/be/src/cloud/config.h @@ -34,7 +34,7 @@ static inline bool is_cloud_mode() { // If meta services are deployed behind a load balancer, set this config to "host:port" of the load balancer. // Here is a set of configs to configure the connection behaviors: // - meta_service_connection_pooled: distribute the long connections to different RS of the VIP. -// - meta_service_connection_age_base_minutes: expire the connection after a random time during [base, 2*base], +// - meta_service_connection_age_base_seconds: expire the connection after a random time during [base, 2*base], // so that the BE has a chance to connect to a new RS. (When you add a new RS, the BE will connect to it) // - meta_service_idle_connection_timeout_ms: rebuild the idle connections after the timeout exceeds. Some LB // vendors will reset the connection if it is idle for a long time. @@ -50,7 +50,7 @@ DECLARE_mInt64(meta_service_connection_pool_size); // has a chance to connect to a new RS. Set zero to disable it. // // Only works when meta_service_endpoint is set to a single host. -DECLARE_mInt32(meta_service_connection_age_base_minutes); +DECLARE_mInt32(meta_service_connection_age_base_seconds); // Rebuild the idle connections after the timeout exceeds. Set zero to disable it. // // Only works when meta_service_endpoint is set to a single host. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org