Skip to content

Commit

Permalink
Added tools and options for etcd election client
Browse files Browse the repository at this point in the history
Signed-off-by: Shanicky Chen <peng@risingwave-labs.com>
  • Loading branch information
shanicky committed Mar 23, 2023
1 parent 3e8ce31 commit 10e38be
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions risedev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ profile:

3etcd-3meta:
steps:
- use: minio
- use: etcd
unsafe-no-fsync: true
port: 2388
Expand Down Expand Up @@ -234,9 +235,11 @@ profile:
port: 25690
dashboard-port: 25691
exporter-port: 21250
- use: compactor

3etcd-3meta-1cn-1fe:
steps:
- use: minio
- use: etcd
unsafe-no-fsync: true
port: 2388
Expand Down Expand Up @@ -264,6 +267,7 @@ profile:
port: 25690
dashboard-port: 25691
exporter-port: 21250
- use: compactor
- use: compute-node
- use: frontend

Expand Down
8 changes: 7 additions & 1 deletion src/meta/src/rpc/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,16 @@ pub async fn rpc_serve(
.map_err(|e| anyhow::anyhow!("failed to connect etcd {}", e))?;
let meta_store = Arc::new(EtcdMetaStore::new(client));

// `with_keep_alive` option will break the long connection in election client.
let mut election_options = ConnectOptions::default();
if let Some((username, password)) = &credentials {
election_options = election_options.with_user(username, password)
}

let election_client = Arc::new(
EtcdElectionClient::new(
endpoints,
Some(options),
Some(election_options),
auth_enabled,
address_info.advertise_addr.clone(),
)
Expand Down
2 changes: 0 additions & 2 deletions src/risedevtool/src/task/etcd_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ impl EtcdService {
.arg(&advertise_peer_urls)
.arg("--listen-metrics-urls")
.arg(&exporter_urls)
.arg("--name")
.arg("risedev-meta")
.arg("--max-txn-ops")
.arg("999999")
.arg("--max-request-bytes")
Expand Down

0 comments on commit 10e38be

Please sign in to comment.