From 2b699e735c08a4b528a02236bb97951203a294a3 Mon Sep 17 00:00:00 2001 From: Weny Xu Date: Fri, 6 Dec 2024 11:14:08 +0800 Subject: [PATCH] chore: correct example config file (#5105) * chore: correct example config file * fix: fix unit test --- config/config.md | 2 +- config/metasrv.example.toml | 2 +- src/meta-srv/src/metasrv.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.md b/config/config.md index 15025b871125..ec00eb98b730 100644 --- a/config/config.md +++ b/config/config.md @@ -286,7 +286,7 @@ | `data_home` | String | `/tmp/metasrv/` | The working home directory. | | `bind_addr` | String | `127.0.0.1:3002` | The bind address of metasrv. | | `server_addr` | String | `127.0.0.1:3002` | The communication server address for frontend and datanode to connect to metasrv, "127.0.0.1:3002" by default for localhost. | -| `store_addr` | String | `127.0.0.1:2379` | Store server address default to etcd store. | +| `store_addrs` | Array | -- | Store server address default to etcd store. | | `selector` | String | `round_robin` | Datanode selector type.
- `round_robin` (default value)
- `lease_based`
- `load_based`
For details, please see "https://docs.greptime.com/developer-guide/metasrv/selector". | | `use_memory_store` | Bool | `false` | Store data in memory. | | `enable_telemetry` | Bool | `true` | Whether to enable greptimedb telemetry. | diff --git a/config/metasrv.example.toml b/config/metasrv.example.toml index b80d1c164e0e..bcd7ee41412b 100644 --- a/config/metasrv.example.toml +++ b/config/metasrv.example.toml @@ -8,7 +8,7 @@ bind_addr = "127.0.0.1:3002" server_addr = "127.0.0.1:3002" ## Store server address default to etcd store. -store_addr = "127.0.0.1:2379" +store_addrs = ["127.0.0.1:2379"] ## Datanode selector type. ## - `round_robin` (default value) diff --git a/src/meta-srv/src/metasrv.rs b/src/meta-srv/src/metasrv.rs index 9de0487d01cc..716b85f83485 100644 --- a/src/meta-srv/src/metasrv.rs +++ b/src/meta-srv/src/metasrv.rs @@ -179,7 +179,7 @@ impl Default for MetasrvOptions { impl Configurable for MetasrvOptions { fn env_list_keys() -> Option<&'static [&'static str]> { - Some(&["wal.broker_endpoints"]) + Some(&["wal.broker_endpoints", "store_addrs"]) } }