From b8eba89a100fda29c8dee29a7d5bac35c3517c2b Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Wed, 3 May 2023 19:46:55 +0200 Subject: [PATCH] improve docstring on persist_index_part_with_deleted_flag --- pageserver/src/tenant/remote_timeline_client.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pageserver/src/tenant/remote_timeline_client.rs b/pageserver/src/tenant/remote_timeline_client.rs index b5707c5ea9..07f2ec1a3d 100644 --- a/pageserver/src/tenant/remote_timeline_client.rs +++ b/pageserver/src/tenant/remote_timeline_client.rs @@ -646,7 +646,13 @@ impl RemoteTimelineClient { Ok(()) } - // NOTE: if there were no tasks to call stop we need to call stop by ourselves first + /// Set the deleted_at field in the remote index file. + /// + /// This fails if the upload queue has not been `stop()`ed. + /// + /// The caller is responsible for calling `stop()` AND for waiting + /// for any ongoing upload tasks to finish after `stop()` has succeeded. + /// Check method [`RemoteTimelineClient::stop`] for details. pub(crate) async fn persist_index_part_with_deleted_flag( self: &Arc, ) -> anyhow::Result<()> {