Skip to content

Commit d967fcc

Browse files
authored
chore: use a separate option for etcd election client (risingwavelabs#8726)
Signed-off-by: Shanicky Chen <[email protected]>
1 parent 92584b6 commit d967fcc

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

risedev.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ profile:
207207

208208
3etcd-3meta:
209209
steps:
210+
- use: minio
210211
- use: etcd
211212
unsafe-no-fsync: true
212213
port: 2388
@@ -234,9 +235,11 @@ profile:
234235
port: 25690
235236
dashboard-port: 25691
236237
exporter-port: 21250
238+
- use: compactor
237239

238240
3etcd-3meta-1cn-1fe:
239241
steps:
242+
- use: minio
240243
- use: etcd
241244
unsafe-no-fsync: true
242245
port: 2388
@@ -264,6 +267,7 @@ profile:
264267
port: 25690
265268
dashboard-port: 25691
266269
exporter-port: 21250
270+
- use: compactor
267271
- use: compute-node
268272
- use: frontend
269273

src/meta/src/rpc/server.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,16 @@ pub async fn rpc_serve(
130130
.map_err(|e| anyhow::anyhow!("failed to connect etcd {}", e))?;
131131
let meta_store = Arc::new(EtcdMetaStore::new(client));
132132

133+
// `with_keep_alive` option will break the long connection in election client.
134+
let mut election_options = ConnectOptions::default();
135+
if let Some((username, password)) = &credentials {
136+
election_options = election_options.with_user(username, password)
137+
}
138+
133139
let election_client = Arc::new(
134140
EtcdElectionClient::new(
135141
endpoints,
136-
Some(options),
142+
Some(election_options),
137143
auth_enabled,
138144
address_info.advertise_addr.clone(),
139145
)

src/risedevtool/src/task/etcd_service.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ impl EtcdService {
5757
.arg(&advertise_peer_urls)
5858
.arg("--listen-metrics-urls")
5959
.arg(&exporter_urls)
60-
.arg("--name")
61-
.arg("risedev-meta")
6260
.arg("--max-txn-ops")
6361
.arg("999999")
6462
.arg("--max-request-bytes")

0 commit comments

Comments
 (0)