Skip to content

Commit

Permalink
refactor!: unify the option names across all components part2 (#5476)
Browse files Browse the repository at this point in the history
* refactor: part2, replace old options in doc yaml

* chore: remove deprecated options

* chore: update config.md

* fix: ut
  • Loading branch information
fengjiachun authored Feb 7, 2025
1 parent 59e6ec0 commit 29218b5
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 38 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ docker run -p 127.0.0.1:4000-4003:4000-4003 \
--name greptime --rm \
greptime/greptimedb:latest standalone start \
--http-addr 0.0.0.0:4000 \
--rpc-addr 0.0.0.0:4001 \
--rpc-bind-addr 0.0.0.0:4001 \
--mysql-addr 0.0.0.0:4002 \
--postgres-addr 0.0.0.0:4003
```
Expand Down
3 changes: 0 additions & 3 deletions config/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,6 @@
| `init_regions_in_background` | Bool | `false` | Initialize all regions in the background during the startup.<br/>By default, it provides services after all regions have been initialized. |
| `init_regions_parallelism` | Integer | `16` | Parallelism of initializing regions. |
| `max_concurrent_queries` | Integer | `0` | The maximum current queries allowed to be executed. Zero means unlimited. |
| `rpc_runtime_size` | Integer | Unset | Deprecated, use `grpc.runtime_size` instead. |
| `rpc_max_recv_message_size` | String | Unset | Deprecated, use `grpc.rpc_max_recv_message_size` instead. |
| `rpc_max_send_message_size` | String | Unset | Deprecated, use `grpc.rpc_max_send_message_size` instead. |
| `enable_telemetry` | Bool | `true` | Enable telemetry to collect anonymous usage data. Enabled by default. |
| `http` | -- | -- | The HTTP server options. |
| `http.addr` | String | `127.0.0.1:4000` | The address to bind the HTTP server. |
Expand Down
12 changes: 0 additions & 12 deletions config/datanode.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@ init_regions_parallelism = 16
## The maximum current queries allowed to be executed. Zero means unlimited.
max_concurrent_queries = 0

## Deprecated, use `grpc.runtime_size` instead.
## @toml2docs:none-default
rpc_runtime_size = 8

## Deprecated, use `grpc.rpc_max_recv_message_size` instead.
## @toml2docs:none-default
rpc_max_recv_message_size = "512MB"

## Deprecated, use `grpc.rpc_max_send_message_size` instead.
## @toml2docs:none-default
rpc_max_send_message_size = "512MB"

## Enable telemetry to collect anonymous usage data. Enabled by default.
#+ enable_telemetry = true

Expand Down
14 changes: 7 additions & 7 deletions docker/docker-compose/cluster-with-etcd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ services:
command:
- metasrv
- start
- --bind-addr=0.0.0.0:3002
- --server-addr=metasrv:3002
- --rpc-bind-addr=0.0.0.0:3002
- --rpc-server-addr=metasrv:3002
- --store-addrs=etcd0:2379
- --http-addr=0.0.0.0:3000
healthcheck:
Expand All @@ -68,8 +68,8 @@ services:
- datanode
- start
- --node-id=0
- --rpc-addr=0.0.0.0:3001
- --rpc-hostname=datanode0:3001
- --rpc-bind-addr=0.0.0.0:3001
- --rpc-server-addr=datanode0:3001
- --metasrv-addrs=metasrv:3002
- --http-addr=0.0.0.0:5000
volumes:
Expand Down Expand Up @@ -98,7 +98,7 @@ services:
- start
- --metasrv-addrs=metasrv:3002
- --http-addr=0.0.0.0:4000
- --rpc-addr=0.0.0.0:4001
- --rpc-bind-addr=0.0.0.0:4001
- --mysql-addr=0.0.0.0:4002
- --postgres-addr=0.0.0.0:4003
healthcheck:
Expand All @@ -123,8 +123,8 @@ services:
- start
- --node-id=0
- --metasrv-addrs=metasrv:3002
- --rpc-addr=0.0.0.0:4004
- --rpc-hostname=flownode0:4004
- --rpc-bind-addr=0.0.0.0:4004
- --rpc-server-addr=flownode0:4004
- --http-addr=0.0.0.0:4005
depends_on:
frontend0:
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ mod tests {
.args([
"datanode",
"start",
"--rpc-addr=0.0.0.0:4321",
"--rpc-bind-addr=0.0.0.0:4321",
"--node-id=1",
&format!("--data-home={}", data_home.path().display()),
&format!("--wal-dir={}", wal_dir.path().display()),
Expand All @@ -80,7 +80,7 @@ mod tests {
"--log-level=off",
"cli",
"attach",
"--grpc-addr=0.0.0.0:4321",
"--grpc-bind-addr=0.0.0.0:4321",
// history commands can sneaky into stdout and mess up our tests, so disable it
"--disable-helper",
]);
Expand Down
6 changes: 0 additions & 6 deletions src/cmd/tests/load_config_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ use std::time::Duration;
use cmd::options::GreptimeOptions;
use cmd::standalone::StandaloneOptions;
use common_config::Configurable;
use common_grpc::channel_manager::{
DEFAULT_MAX_GRPC_RECV_MESSAGE_SIZE, DEFAULT_MAX_GRPC_SEND_MESSAGE_SIZE,
};
use common_options::datanode::{ClientOptions, DatanodeClientOptions};
use common_telemetry::logging::{LoggingOptions, SlowQueryOptions, DEFAULT_OTLP_ENDPOINT};
use common_wal::config::raft_engine::RaftEngineConfig;
Expand Down Expand Up @@ -93,9 +90,6 @@ fn test_load_datanode_example_config() {
grpc: GrpcOptions::default()
.with_bind_addr("127.0.0.1:3001")
.with_server_addr("127.0.0.1:3001"),
rpc_runtime_size: Some(8),
rpc_max_recv_message_size: Some(DEFAULT_MAX_GRPC_RECV_MESSAGE_SIZE),
rpc_max_send_message_size: Some(DEFAULT_MAX_GRPC_SEND_MESSAGE_SIZE),
..Default::default()
},
..Default::default()
Expand Down
14 changes: 7 additions & 7 deletions tests/runner/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ impl Env {
"start".to_string(),
"--metasrv-addrs=127.0.0.1:29302".to_string(),
"--http-addr=127.0.0.1:29503".to_string(),
format!("--rpc-addr={}", GRPC_SERVER_ADDR),
format!("--rpc-bind-addr={}", GRPC_SERVER_ADDR),
format!("--mysql-addr={}", MYSQL_SERVER_ADDR),
format!("--postgres-addr={}", POSTGRES_SERVER_ADDR),
format!(
Expand All @@ -373,9 +373,9 @@ impl Env {
DEFAULT_LOG_LEVEL.to_string(),
subcommand.to_string(),
"start".to_string(),
"--bind-addr".to_string(),
"--rpc-bind-addr".to_string(),
"127.0.0.1:29302".to_string(),
"--server-addr".to_string(),
"--rpc-server-addr".to_string(),
"127.0.0.1:29302".to_string(),
"--enable-region-failover".to_string(),
"false".to_string(),
Expand Down Expand Up @@ -457,8 +457,8 @@ impl Env {
subcommand.to_string(),
"start".to_string(),
];
args.push(format!("--rpc-addr=127.0.0.1:2941{id}"));
args.push(format!("--rpc-hostname=127.0.0.1:2941{id}"));
args.push(format!("--rpc-bind-addr=127.0.0.1:2941{id}"));
args.push(format!("--rpc-server-addr=127.0.0.1:2941{id}"));
args.push(format!("--http-addr=127.0.0.1:2943{id}"));
args.push(format!("--data-home={}", data_home.display()));
args.push(format!("--log-dir={}/logs", data_home.display()));
Expand All @@ -482,8 +482,8 @@ impl Env {
subcommand.to_string(),
"start".to_string(),
];
args.push(format!("--rpc-addr=127.0.0.1:2968{id}"));
args.push(format!("--rpc-hostname=127.0.0.1:2968{id}"));
args.push(format!("--rpc-bind-addr=127.0.0.1:2968{id}"));
args.push(format!("--rpc-server-addr=127.0.0.1:2968{id}"));
args.push(format!("--node-id={id}"));
args.push(format!(
"--log-dir={}/greptimedb-flownode/logs",
Expand Down

0 comments on commit 29218b5

Please sign in to comment.