feat: auto detecting local IP to use as hostname (#5314)

* feat: auto detecting hostname

* chore: update config.md

* chore: bring back hostname

* chore: apply suggestions from CR

* chore: use const

* chore: apply suggesions from CR

* fix: fix sqlness
This commit is contained in:
Weny Xu
2025-01-08 20:06:31 +08:00
committed by GitHub
parent 52eebfce77
commit 7f307a4cac
25 changed files with 131 additions and 20 deletions

View File

@@ -185,6 +185,7 @@ impl GreptimeDbClusterBuilder {
max_metadata_value_size: None,
},
wal: self.metasrv_wal_config.clone(),
server_addr: "127.0.0.1:3002".to_string(),
..Default::default()
};

View File

@@ -45,6 +45,7 @@ use frontend::instance::builder::FrontendBuilder;
use frontend::instance::{FrontendInstance, Instance, StandaloneDatanodeManager};
use meta_srv::metasrv::{FLOW_ID_SEQ, TABLE_ID_SEQ};
use query::stats::StatementStatistics;
use servers::grpc::GrpcOptions;
use servers::Mode;
use snafu::ResultExt;
@@ -291,6 +292,7 @@ impl GreptimeDbStandaloneBuilder {
procedure: procedure_config,
metadata_store: kv_backend_config,
wal: self.metasrv_wal_config.clone().into(),
grpc: GrpcOptions::default().with_hostname("127.0.0.1:4001"),
..StandaloneOptions::default()
};

View File

@@ -349,7 +349,9 @@ pub(crate) fn create_datanode_opts(
providers,
store: default_store,
},
grpc: GrpcOptions::default().with_addr(PEER_PLACEHOLDER_ADDR),
grpc: GrpcOptions::default()
.with_addr(PEER_PLACEHOLDER_ADDR)
.with_hostname(PEER_PLACEHOLDER_ADDR),
mode,
wal: wal_config,
..Default::default()

View File

@@ -850,7 +850,7 @@ is_strict_mode = false
[grpc]
addr = "127.0.0.1:4001"
hostname = "127.0.0.1"
hostname = "127.0.0.1:4001"
max_recv_message_size = "512MiB"
max_send_message_size = "512MiB"
runtime_size = 8