From 07d91400d23e7dc3bad9b5f96015b7925fa6270e Mon Sep 17 00:00:00 2001 From: WenyXu Date: Thu, 5 Dec 2024 12:56:35 +0000 Subject: [PATCH 1/2] chore: correct example config file --- config/config.md | 2 +- config/metasrv.example.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.md b/config/config.md index 15025b871125..47843b9361f3 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` | String | `127.0.0.1:2379` | 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..49d04d068a75 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) From d86de24f53d0098623fe6117c2efc3a6b0c92a90 Mon Sep 17 00:00:00 2001 From: WenyXu Date: Fri, 6 Dec 2024 02:58:51 +0000 Subject: [PATCH 2/2] 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 47843b9361f3..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_addrs` | 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 49d04d068a75..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_addrs = "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"]) } }