mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-04 04:12:55 +00:00
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:
@@ -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()
|
||||
};
|
||||
|
||||
|
||||
@@ -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()
|
||||
};
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user