From fadcddc89a281b466bdeac81bf03cbf8411ed155 Mon Sep 17 00:00:00 2001 From: wgs13579 Date: Wed, 28 Apr 2021 19:48:49 +0800 Subject: [PATCH] Fix the problem that ODP cannot be accessed normally from the local configuration file after OCP hangs --- src/obproxy/obutils/ob_proxy_json_config_info.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/obproxy/obutils/ob_proxy_json_config_info.cpp b/src/obproxy/obutils/ob_proxy_json_config_info.cpp index c160a0f..1db5da7 100644 --- a/src/obproxy/obutils/ob_proxy_json_config_info.cpp +++ b/src/obproxy/obutils/ob_proxy_json_config_info.cpp @@ -1090,6 +1090,9 @@ int ObProxyJsonConfigInfo::parse_rslist_data(const Value *json_value, const ObSt } if (OB_SUCC(ret)) { if (is_from_local) { + if (cluster_id == OB_DEFAULT_CLUSTER_ID) { + cluster_id = json_cluster_id; + } if (cluster_name == OB_META_DB_CLUSTER_NAME) { if (!real_meta_cluster_name.empty()) { data_info_.meta_table_info_.real_cluster_name_.set_value(real_meta_cluster_name); -- GitLab