From 8c1962d40c784cef4707f0fce3b301fe435a7e39 Mon Sep 17 00:00:00 2001 From: Joonas Koivunen Date: Wed, 10 May 2023 16:27:08 +0300 Subject: [PATCH] refactor: simplify, racy removes no longer intended --- pageserver/src/tenant.rs | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/pageserver/src/tenant.rs b/pageserver/src/tenant.rs index 490f9c5f79..a963911295 100644 --- a/pageserver/src/tenant.rs +++ b/pageserver/src/tenant.rs @@ -1657,26 +1657,11 @@ impl Tenant { })); match removed_timeline { - Ok(None) => { - // This can legitimately happen if there's a concurrent call to this function. - // T1 T2 - // lock - // unlock - // lock - // unlock - // remove files - // lock - // remove from map - // unlock - // return - // remove files - // lock - // remove from map observes empty map - // unlock - // return - debug!("concurrent call to this function won the race"); - } Ok(Some(_)) => {} + Ok(None) => { + // with SharedRetryable this should no longer happen + warn!("no other task should had dropped the Timeline"); + } Err(_panic) => return Err(InnerDeleteTimelineError::DeletedGrewChildren), }