Skip to content

Commit dc76ad7

Browse files
authored
deprecate: remove host cmd line argument when starting meta node (risingwavelabs#8574)
1 parent b0f276b commit dc76ad7

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
@@ -65,19 +65,13 @@ pub struct MetaNodeOpts {
6565
#[clap(long, env = "RW_LISTEN_ADDR", default_value = "127.0.0.1:5690")]
6666
listen_addr: String,
6767

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

8276
#[clap(long, env = "RW_DASHBOARD_HOST")]
8377
dashboard_host: Option<String>,
@@ -167,7 +161,6 @@ pub struct OverrideConfigOpts {
167161
}
168162

169163
use std::future::Future;
170-
use std::net::SocketAddr;
171164
use std::pin::Pin;
172165

173166
use risingwave_common::config::{load_config, MetaBackend, RwConfig};
@@ -183,13 +176,9 @@ pub fn start(opts: MetaNodeOpts) -> Pin<Box<dyn Future<Output = ()> + Send>> {
183176
let config = load_config(&opts.config_path, Some(opts.override_opts));
184177
info!("> config: {:?}", config);
185178
info!("> version: {} ({})", RW_VERSION, GIT_SHA);
186-
let listen_addr: SocketAddr = opts.listen_addr.parse().unwrap();
187-
let meta_addr = opts.host.unwrap_or_else(|| listen_addr.ip().to_string());
179+
let listen_addr = opts.listen_addr.parse().unwrap();
188180
let dashboard_addr = opts.dashboard_host.map(|x| x.parse().unwrap());
189181
let prometheus_addr = opts.prometheus_host.map(|x| x.parse().unwrap());
190-
let advertise_addr = opts
191-
.advertise_addr
192-
.unwrap_or_else(|| format!("{}:{}", meta_addr, listen_addr.port()));
193182
let backend = match config.meta.backend {
194183
MetaBackend::Etcd => MetaStoreBackend::Etcd {
195184
endpoints: opts
@@ -214,7 +203,7 @@ pub fn start(opts: MetaNodeOpts) -> Pin<Box<dyn Future<Output = ()> + Send>> {
214203

215204
info!("Meta server listening at {}", listen_addr);
216205
let add_info = AddressInfo {
217-
advertise_addr,
206+
advertise_addr: opts.advertise_addr,
218207
listen_addr,
219208
prometheus_addr,
220209
dashboard_addr,

0 commit comments

Comments
 (0)