Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't set proxy addr default value in tiflash code #3539

Merged
merged 4 commits into from
Nov 26, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
hehechen marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can also change these port in tests/docker/config/tiflash_dt.toml

# status-addr = "0.0.0.0:20292"
# advertise-status-addr = "tiflash0:20292"
# engine-addr = "tiflash0:3930"

[logger]
Expand Down