Skip to content

Commit

Permalink
don't set proxy addr default value in tiflash code (#3539)
Browse files Browse the repository at this point in the history
  • Loading branch information
hehechen authored Nov 26, 2021
1 parent d3bc89c commit f0b7634
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion contrib/tiflash-proxy
2 changes: 0 additions & 2 deletions dbms/src/Core/Defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
3 changes: 1 addition & 2 deletions dbms/src/Server/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@ struct TiFlashProxyConfig
std::unordered_map<std::string, std::string> 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";
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)
{
Expand All @@ -240,7 +240,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
Expand Down
4 changes: 2 additions & 2 deletions etc/config-template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,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]
Expand Down

0 comments on commit f0b7634

Please sign in to comment.