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 ee789fefbe7 [opt](cloud) Add config enable_meta_service_endpoint_consistency_check (#49264) ee789fefbe7 is described below commit ee789fefbe7d997ac4971a89e4aa8523522fd993 Author: Gavin Chou <ga...@selectdb.com> AuthorDate: Sat Mar 22 15:31:59 2025 +0800 [opt](cloud) Add config enable_meta_service_endpoint_consistency_check (#49264) Whether check config::meta_service_endpoint is identical to the ms endpoint from FE master heartbeat This may help in some cases that we intend to change the config only FE side or BE side --- be/src/agent/heartbeat_server.cpp | 9 +++++---- be/src/cloud/config.cpp | 1 + be/src/cloud/config.h | 3 +++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/be/src/agent/heartbeat_server.cpp b/be/src/agent/heartbeat_server.cpp index 11345ea06f0..0cb6bea2220 100644 --- a/be/src/agent/heartbeat_server.cpp +++ b/be/src/agent/heartbeat_server.cpp @@ -256,18 +256,19 @@ Status HeartbeatServer::_heartbeat(const TMasterInfo& master_info) { if (config::meta_service_endpoint.empty() && !master_info.meta_service_endpoint.empty()) { auto st = config::set_config("meta_service_endpoint", master_info.meta_service_endpoint, true); - LOG(INFO) << "set config meta_service_endpoing " << master_info.meta_service_endpoint + LOG(INFO) << "set config meta_service_endpoint " << master_info.meta_service_endpoint << " " << st; } - if (master_info.meta_service_endpoint != config::meta_service_endpoint) { + if (master_info.meta_service_endpoint != config::meta_service_endpoint && + config::enable_meta_service_endpoint_consistency_check) { LOG(WARNING) << "Detected mismatch in meta_service_endpoint configuration between FE " "and BE. " << "FE meta_service_endpoint: " << master_info.meta_service_endpoint << ", BE meta_service_endpoint: " << config::meta_service_endpoint; return Status::InvalidArgument<false>( - "fe and be do not work in same mode, fe meta_service_endpoint: {}," - " be meta_service_endpoint: {}", + "fe and be do not work in same mode or meta_service_endpoint mismatch," + "fe meta_service_endpoint: {}, be meta_service_endpoint: {}", master_info.meta_service_endpoint, config::meta_service_endpoint); } } diff --git a/be/src/cloud/config.cpp b/be/src/cloud/config.cpp index 472a0f77231..6e4b37bde32 100644 --- a/be/src/cloud/config.cpp +++ b/be/src/cloud/config.cpp @@ -25,6 +25,7 @@ namespace doris::config { DEFINE_String(deploy_mode, ""); DEFINE_mString(cloud_unique_id, ""); DEFINE_mString(meta_service_endpoint, ""); +DEFINE_mBool(enable_meta_service_endpoint_consistency_check, "true"); DEFINE_Bool(meta_service_use_load_balancer, "false"); DEFINE_mInt32(meta_service_rpc_timeout_ms, "10000"); DEFINE_Bool(meta_service_connection_pooled, "true"); diff --git a/be/src/cloud/config.h b/be/src/cloud/config.h index f79038662ef..72151b9ce64 100644 --- a/be/src/cloud/config.h +++ b/be/src/cloud/config.h @@ -44,6 +44,9 @@ static inline bool is_cloud_mode() { // separated by a comma, like "host:port,host:port,host:port", then BE will choose a server to connect in randomly. // In this mode, The config meta_service_connection_pooled is still useful, but the other two configs will be ignored. DECLARE_mString(meta_service_endpoint); +// Whether check config::meta_service_endpoint is identical to the ms endpoint from FE master heartbeat +// This may help in some cases that we intend to change the config only FE side or BE side +DECLARE_mBool(enable_meta_service_endpoint_consistency_check); // Set the underlying connection type to pooled. DECLARE_Bool(meta_service_connection_pooled); DECLARE_mInt64(meta_service_connection_pool_size); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org