From 14869abb7718646cb6b791e32f08722b1d6290b4 Mon Sep 17 00:00:00 2001 From: Joonas Koivunen Date: Thu, 18 Jul 2024 08:47:33 +0000 Subject: [PATCH] complete the plumbing with non-notifying attempt_blocks_gc impl --- pageserver/src/tenant/timeline/detach_ancestor.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pageserver/src/tenant/timeline/detach_ancestor.rs b/pageserver/src/tenant/timeline/detach_ancestor.rs index 5597ccf498..e79a1a0549 100644 --- a/pageserver/src/tenant/timeline/detach_ancestor.rs +++ b/pageserver/src/tenant/timeline/detach_ancestor.rs @@ -140,7 +140,11 @@ impl SharedState { pub(crate) fn attempt_blocks_gc(&self) -> bool { // if we have any started and not finished ancestor detaches, we must remain paused // and also let any trying to start operation know that we've paused. - false + + // Two cases: + // - there is an actual attempt started + // - we have learned from indexparts that an attempt will be retried in near future + self.inner.lock().unwrap().is_some() } /// Sleep for the duration, while letting any ongoing ancestor_detach attempt know that gc has