From 491273ddb2007f5338974268d80889776264887b Mon Sep 17 00:00:00 2001 From: Croxx Date: Wed, 27 Sep 2023 17:41:40 +0800 Subject: [PATCH] chore: refine start log (#12567) Signed-off-by: MrCroxx --- src/compute/src/lib.rs | 3 ++- src/meta/src/lib.rs | 3 ++- src/storage/compactor/src/lib.rs | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/compute/src/lib.rs b/src/compute/src/lib.rs index ba53ebb2d3aef..04a1b3ba37045 100644 --- a/src/compute/src/lib.rs +++ b/src/compute/src/lib.rs @@ -200,7 +200,6 @@ pub fn start(opts: ComputeNodeOpts) -> Pin + Send>> validate_opts(&opts); let listen_addr = opts.listen_addr.parse().unwrap(); - tracing::info!("Server Listening at {}", listen_addr); let advertise_addr = opts .advertise_addr @@ -216,6 +215,8 @@ pub fn start(opts: ComputeNodeOpts) -> Pin + Send>> let (join_handle_vec, _shutdown_send) = compute_node_serve(listen_addr, advertise_addr, opts).await; + tracing::info!("Server listening at {}", listen_addr); + for join_handle in join_handle_vec { join_handle.await.unwrap(); } diff --git a/src/meta/src/lib.rs b/src/meta/src/lib.rs index f214f359cbcbb..2e8bd3e3d8f07 100644 --- a/src/meta/src/lib.rs +++ b/src/meta/src/lib.rs @@ -246,7 +246,6 @@ pub fn start(opts: MetaNodeOpts) -> Pin + Send>> { .collect() }); - info!("Meta server listening at {}", listen_addr); let add_info = AddressInfo { advertise_addr: opts.advertise_addr, listen_addr, @@ -319,6 +318,8 @@ pub fn start(opts: MetaNodeOpts) -> Pin + Send>> { .await .unwrap(); + tracing::info!("Meta server listening at {}", listen_addr); + match leader_lost_handle { None => { tokio::select! { diff --git a/src/storage/compactor/src/lib.rs b/src/storage/compactor/src/lib.rs index 6cca88f6bfc89..c7ddcd8c22340 100644 --- a/src/storage/compactor/src/lib.rs +++ b/src/storage/compactor/src/lib.rs @@ -109,10 +109,11 @@ pub fn start(opts: CompactorOpts) -> Pin + Send>> { tracing::info!("Proxy rpc endpoint: {}", opts.proxy_rpc_endpoint.clone()); let listen_addr = opts.listen_addr.parse().unwrap(); - tracing::info!("Server Listening at {}", listen_addr); let (join_handle, _shutdown_sender) = shared_compactor_serve(listen_addr, opts).await; + tracing::info!("Server listening at {}", listen_addr); + join_handle.await.unwrap(); }), None | Some(CompactorMode::Dedicated) => Box::pin(async move { @@ -120,7 +121,6 @@ pub fn start(opts: CompactorOpts) -> Pin + Send>> { tracing::info!("meta address: {}", opts.meta_address.clone()); let listen_addr = opts.listen_addr.parse().unwrap(); - tracing::info!("Server Listening at {}", listen_addr); let advertise_addr = opts .advertise_addr @@ -135,6 +135,8 @@ pub fn start(opts: CompactorOpts) -> Pin + Send>> { let (join_handle, observer_join_handle, _shutdown_sender) = compactor_serve(listen_addr, advertise_addr, opts).await; + tracing::info!("Server listening at {}", listen_addr); + join_handle.await.unwrap(); observer_join_handle.abort(); }),