pageserver: clean up request context api

This commit removes `RequestContextBuilder::extend`.
Instead, callers should create attached children via
`RequestContextBuilder` interface.
This commit is contained in:
Vlad Lazar
2025-01-27 11:08:10 +01:00
parent 91aa9aef45
commit e8a00a3464
9 changed files with 47 additions and 42 deletions

View File

@@ -2650,9 +2650,10 @@ async fn getpage_at_lsn_handler_inner(
let lsn: Option<Lsn> = parse_query_param(&request, "lsn")?;
async {
let ctx = RequestContext::new(TaskKind::MgmtRequest, DownloadBehavior::Download);
// Enable read path debugging
let ctx = RequestContextBuilder::extend(&ctx).read_path_debug(true).build();
let ctx = RequestContextBuilder::new(TaskKind::MgmtRequest)
.download_behavior(DownloadBehavior::Download)
.read_path_debug(true)
.root();
let timeline = active_timeline_of_active_tenant(&state.tenant_manager, tenant_shard_id, timeline_id).await?;
// Use last_record_lsn if no lsn is provided