From ca3ca2bb9c92bf0e0b6f7d056f9545958a180ae1 Mon Sep 17 00:00:00 2001 From: John Spray Date: Thu, 28 Sep 2023 17:20:34 +0100 Subject: [PATCH] pageserver: don't try and recover deletion queue if no remote storage (#5419) ## Problem Because `neon_local` by default runs with no remote storage, it was not running the deletion queue workers, and the attempt to call into `recover()` was failing. This is a bogus configuration that will go away when we make remote storage mandatory. ## Summary of changes Don't try and do deletion queue recovery when remote storage is disabled. The reason we don't just unset `control_plane_api` to avoid this is that generations will soon become mandatory, irrespective of when we make remote storage mandatory. --- pageserver/src/tenant/mgr.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pageserver/src/tenant/mgr.rs b/pageserver/src/tenant/mgr.rs index 6f3863dd4b..17bcc9eb5f 100644 --- a/pageserver/src/tenant/mgr.rs +++ b/pageserver/src/tenant/mgr.rs @@ -130,10 +130,15 @@ pub async fn init_tenant_mgr( // deletion list entries may still be valid. We provide that by pushing a recovery operation into // the queue. Sequential processing of te queue ensures that recovery is done before any new tenant deletions // are processed, even though we don't block on recovery completing here. - resources - .deletion_queue_client - .recover(result.clone()) - .await?; + // + // Must only do this if remote storage is enabled, otherwise deletion queue + // is not running and channel push will fail. + if resources.remote_storage.is_some() { + resources + .deletion_queue_client + .recover(result.clone()) + .await?; + } Some(result) } else {