Skip to content

Commit 90b15ef

Browse files
committed
deprecate: remove host cmd line argument when starting meta node
1 parent 1a11c3f commit 90b15ef

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

.github/labeler.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ labels:
2222
title: "^test.*"
2323
- label: "component/doc"
2424
title: "^doc.*"
25+
- label: "type/deprecate"
26+
title: "^deprecate.*"
2527

2628
- label: "user-facing-changes"
2729
negate: true

.github/pr-title-checker-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"color": "B60205"
55
},
66
"CHECKS": {
7-
"regexp": "^(feat|fix|test|refactor|chore|style|doc|perf|build|ci|revert)(\\(.*\\))?:.*",
7+
"regexp": "^(feat|fix|test|refactor|chore|style|doc|perf|build|ci|revert|deprecate)(\\(.*\\))?:.*",
88
"ignoreLabels" : ["ignore-title"]
99
}
1010
}

src/meta/src/lib.rs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,13 @@ pub struct MetaNodeOpts {
6464
#[clap(long, env = "RW_LISTEN_ADDR", default_value = "127.0.0.1:5690")]
6565
listen_addr: String,
6666

67-
/// Deprecated. But we keep it for backward compatibility.
68-
#[clap(long, env = "RW_HOST")]
69-
host: Option<String>,
70-
7167
/// The address for contacting this instance of the service.
7268
/// This would be synonymous with the service's "public address"
7369
/// or "identifying address".
7470
/// It will serve as a unique identifier in cluster
7571
/// membership and leader election. Must be specified for etcd backend.
76-
/// TODO: After host is removed, we require that this parameter must be provided when using
77-
/// etcd
7872
#[clap(long, env = "RW_ADVERTISE_ADDR")]
79-
advertise_addr: Option<String>,
73+
advertise_addr: String,
8074

8175
#[clap(long, env = "RW_DASHBOARD_HOST")]
8276
dashboard_host: Option<String>,
@@ -165,7 +159,6 @@ pub struct OverrideConfigOpts {
165159
}
166160

167161
use std::future::Future;
168-
use std::net::SocketAddr;
169162
use std::pin::Pin;
170163

171164
use risingwave_common::config::{load_config, MetaBackend, RwConfig};
@@ -181,13 +174,9 @@ pub fn start(opts: MetaNodeOpts) -> Pin<Box<dyn Future<Output = ()> + Send>> {
181174
let config = load_config(&opts.config_path, Some(opts.override_opts));
182175
info!("> config: {:?}", config);
183176
info!("> version: {} ({})", RW_VERSION, GIT_SHA);
184-
let listen_addr: SocketAddr = opts.listen_addr.parse().unwrap();
185-
let meta_addr = opts.host.unwrap_or_else(|| listen_addr.ip().to_string());
177+
let listen_addr = opts.listen_addr.parse().unwrap();
186178
let dashboard_addr = opts.dashboard_host.map(|x| x.parse().unwrap());
187179
let prometheus_addr = opts.prometheus_host.map(|x| x.parse().unwrap());
188-
let advertise_addr = opts
189-
.advertise_addr
190-
.unwrap_or_else(|| format!("{}:{}", meta_addr, listen_addr.port()));
191180
let backend = match config.meta.backend {
192181
MetaBackend::Etcd => MetaStoreBackend::Etcd {
193182
endpoints: opts
@@ -212,7 +201,7 @@ pub fn start(opts: MetaNodeOpts) -> Pin<Box<dyn Future<Output = ()> + Send>> {
212201

213202
info!("Meta server listening at {}", listen_addr);
214203
let add_info = AddressInfo {
215-
advertise_addr,
204+
advertise_addr: opts.advertise_addr,
216205
listen_addr,
217206
prometheus_addr,
218207
dashboard_addr,

0 commit comments

Comments
 (0)