From 8b1c3cab91e590b94749d8a72e00dbf0088f586a Mon Sep 17 00:00:00 2001 From: hehechen Date: Wed, 24 Nov 2021 10:27:36 +0800 Subject: [PATCH 1/3] don't set proxy addr default value in tiflash code --- dbms/src/Core/Defines.h | 2 -- dbms/src/Server/Server.cpp | 2 -- 2 files changed, 4 deletions(-) diff --git a/dbms/src/Core/Defines.h b/dbms/src/Core/Defines.h index b593860705c..0d0d9d8e45d 100644 --- a/dbms/src/Core/Defines.h +++ b/dbms/src/Core/Defines.h @@ -92,8 +92,6 @@ #define DEFAULT_METRICS_PORT 8234 -#define DEFAULT_PROXY_ADDR "127.0.0.1:20170" - #define DEFAULT_HTTP_PORT 8123 #if !defined(__x86_64__) && !defined(__aarch64__) diff --git a/dbms/src/Server/Server.cpp b/dbms/src/Server/Server.cpp index 78dc7a71dab..3deae52d831 100644 --- a/dbms/src/Server/Server.cpp +++ b/dbms/src/Server/Server.cpp @@ -221,7 +221,6 @@ struct TiFlashProxyConfig const String engine_store_address = "engine-addr"; const String engine_store_advertise_address = "advertise-engine-addr"; const String pd_endpoints = "pd-endpoints"; - const String addr = "addr"; explicit TiFlashProxyConfig(Poco::Util::LayeredConfiguration & config) { @@ -240,7 +239,6 @@ struct TiFlashProxyConfig args_map[pd_endpoints] = config.getString("raft.pd_addr"); args_map[engine_store_version] = TiFlashBuildInfo::getReleaseVersion(); args_map[engine_store_git_hash] = TiFlashBuildInfo::getGitHash(); - args_map[addr] = config.getString("flash.proxy.addr", DEFAULT_PROXY_ADDR); if (!args_map.count(engine_store_address)) args_map[engine_store_address] = config.getString("flash.service_addr"); else From 962b727d231b41bdd871c2d334b2b0361490f99c Mon Sep 17 00:00:00 2001 From: hehechen Date: Wed, 24 Nov 2021 15:16:44 +0800 Subject: [PATCH 2/3] keep the default values of 'addr' and 'status_addr' consistent with tiup --- contrib/tiflash-proxy | 2 +- dbms/src/Server/Server.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/tiflash-proxy b/contrib/tiflash-proxy index defbe27e00a..f4002576e3b 160000 --- a/contrib/tiflash-proxy +++ b/contrib/tiflash-proxy @@ -1 +1 @@ -Subproject commit defbe27e00ac7b40c4987bb58f265099effda83f +Subproject commit f4002576e3b2e3e6e2d05168f3c1ec361e2d1110 diff --git a/dbms/src/Server/Server.cpp b/dbms/src/Server/Server.cpp index 3deae52d831..6aad7f06215 100644 --- a/dbms/src/Server/Server.cpp +++ b/dbms/src/Server/Server.cpp @@ -216,6 +216,7 @@ struct TiFlashProxyConfig std::unordered_map val_map; bool is_proxy_runnable = false; + // TiFlash Proxy will set the default value of "flash.proxy.addr", so we don't need to set here. const String engine_store_version = "engine-version"; const String engine_store_git_hash = "engine-git-hash"; const String engine_store_address = "engine-addr"; From 346c025d20d3f722bf05c194e45d23ce1a8becb0 Mon Sep 17 00:00:00 2001 From: hehechen Date: Thu, 25 Nov 2021 10:29:09 +0800 Subject: [PATCH 3/3] fix config-template.toml --- etc/config-template.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/config-template.toml b/etc/config-template.toml index 63af9761e22..1786c15bb81 100644 --- a/etc/config-template.toml +++ b/etc/config-template.toml @@ -108,8 +108,8 @@ # config = "/proxy.toml" # log-file = "/log/proxy.log" # log-level = "info" -# status-addr = "0.0.0.0:20181" -# advertise-status-addr = "tiflash0:20181" +# status-addr = "0.0.0.0:20292" +# advertise-status-addr = "tiflash0:20292" # engine-addr = "tiflash0:3930" [logger]