From 890ff3803e2413be9e641ce0d2be23b3ea9b5a6d Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 28 Dec 2022 10:48:33 +0200 Subject: [PATCH] Allow update_gc_info to download files on-demand. --- pageserver/src/tenant/timeline.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pageserver/src/tenant/timeline.rs b/pageserver/src/tenant/timeline.rs index ec4b3ae665..df02f24239 100644 --- a/pageserver/src/tenant/timeline.rs +++ b/pageserver/src/tenant/timeline.rs @@ -2699,9 +2699,7 @@ impl Timeline { if let Some(pitr_cutoff_timestamp) = now.checked_sub(pitr) { let pitr_timestamp = to_pg_timestamp(pitr_cutoff_timestamp); - match self - .find_lsn_for_timestamp(pitr_timestamp) - .no_ondemand_download()? + match with_ondemand_download(|| self.find_lsn_for_timestamp(pitr_timestamp)).await? { LsnForTimestamp::Present(lsn) => lsn, LsnForTimestamp::Future(lsn) => {