From f356df186032c3cffcf6944ede27ee90f31fed50 Mon Sep 17 00:00:00 2001 From: John Spray Date: Fri, 13 Oct 2023 09:32:51 +0100 Subject: [PATCH] pageserver: more logging during tenant shutdown --- pageserver/src/tenant.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pageserver/src/tenant.rs b/pageserver/src/tenant.rs index a8b0dbe3a8..0c23f2b1da 100644 --- a/pageserver/src/tenant.rs +++ b/pageserver/src/tenant.rs @@ -2030,6 +2030,7 @@ impl Tenant { // It's mesed up. // we just ignore the failure to stop + tracing::debug!("shutting down..."); match self.set_stopping(shutdown_progress, false, false).await { Ok(()) => {} Err(SetStoppingError::Broken) => { @@ -2051,6 +2052,7 @@ impl Tenant { js.spawn(async move { timeline.shutdown(freeze_and_flush).instrument(span).await }); }) }; + tracing::debug!("shutdown waiting for timelines..."); while let Some(res) = js.join_next().await { match res { Ok(()) => {} @@ -2060,12 +2062,15 @@ impl Tenant { } } + tracing::debug!("shutdown waiting for tasks..."); // shutdown all tenant and timeline tasks: gc, compaction, page service // No new tasks will be started for this tenant because it's in `Stopping` state. // // this will additionally shutdown and await all timeline tasks. task_mgr::shutdown_tasks(None, Some(self.tenant_id), None).await; + tracing::debug!("shutdown complete"); + Ok(()) }