From 14ff793582e20e57b8b3a3ad20f1d688c0c1b31f Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Thu, 12 Jan 2023 19:16:26 +0200 Subject: [PATCH] Add comment about the effect of TaskKind to shutdown sequence --- pageserver/src/context.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pageserver/src/context.rs b/pageserver/src/context.rs index fa293345fb..62a2be5455 100644 --- a/pageserver/src/context.rs +++ b/pageserver/src/context.rs @@ -112,6 +112,13 @@ pub enum DownloadBehavior { /// There are many kinds of tasks in the system. Some are associated with a particular /// tenant or timeline, while others are global. /// +/// The task kind affects the shutdown sequence on pageserver shutdown and on detach +/// of an individual tenant. For example, when shutting down the pageserver, we shut +/// down the LibpqEndpointListeners first, so that we don't accept any more client +/// connections while we perform the rest of the shutdown duties. See +/// [`Timeline::graceful_shutdown and`] and [`tenant_mgr::shutdown_pageserver`] +/// for details. +/// /// Note that we don't try to limit how many task of a certain kind can be running /// at the same time. ///