diff --git a/pageserver/src/page_cache.rs b/pageserver/src/page_cache.rs index 7f64cc987c..897aa3e15b 100644 --- a/pageserver/src/page_cache.rs +++ b/pageserver/src/page_cache.rs @@ -552,12 +552,12 @@ impl PageCache { // Section 1.2: Public interface functions for working with immutable file pages. - pub async fn read_immutable_buf( + pub async fn read_immutable_buf<'c>( &'static self, file_id: FileId, blkno: u32, - ctx: &RequestContext, - ) -> anyhow::Result { + ctx: &'c RequestContext, + ) -> anyhow::Result> { let mut cache_key = CacheKey::ImmutableFilePage { file_id, blkno }; self.lock_for_read(&mut cache_key, ctx).await diff --git a/pageserver/src/tenant/timeline.rs b/pageserver/src/tenant/timeline.rs index 4f28b03c67..f8c9413e45 100644 --- a/pageserver/src/tenant/timeline.rs +++ b/pageserver/src/tenant/timeline.rs @@ -158,7 +158,7 @@ pub struct Timeline { /// The generation of the tenant that instantiated us: this is used for safety when writing remote objects. /// Never changes for the lifetime of this [`Timeline`] object. - /// + /// /// This duplicates the generation stored in LocationConf, but that structure is mutable: /// this copy enforces the invariant that generatio doesn't change during a Tenant's lifetime. generation: Generation, @@ -505,7 +505,7 @@ impl Timeline { timer.stop_and_record(); let start = Instant::now(); - let res = self.reconstruct_value(key, lsn, reconstruct_state).await; + let res = self.reconstruct_value(key, lsn, reconstruct_state, ctx).await; let elapsed = start.elapsed(); crate::metrics::RECONSTRUCT_TIME .for_result(&res) @@ -4279,6 +4279,7 @@ impl Timeline { key: Key, request_lsn: Lsn, mut data: ValueReconstructState, + ctx: &RequestContext, ) -> Result { // Perform WAL redo if needed data.records.reverse(); @@ -4342,6 +4343,7 @@ impl Timeline { key, last_rec_lsn, &img, + ctx, ) .await .context("Materialized page memoization failed")