diff --git a/pageserver/src/tenant/remote_timeline_client.rs b/pageserver/src/tenant/remote_timeline_client.rs index 6fb56143a2..f91779ccb5 100644 --- a/pageserver/src/tenant/remote_timeline_client.rs +++ b/pageserver/src/tenant/remote_timeline_client.rs @@ -1709,6 +1709,13 @@ impl RemoteTimelineClient { // Tear down queued ops for op in qi.queued_operations.into_iter() { self.calls_unfinished_metric_end(&op); + + if let UploadOp::Shutdown { since } = &op { + // just in case we have a waiter on the RemoteTimelineClient::shutdown + assert!(qi.shutting_down); + Self::communicate_shutdown(&qi.shutdown_ready, since); + } + // Dropping UploadOp::Barrier() here will make wait_completion() return with an Err() // which is exactly what we want to happen. drop(op);