mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-19 06:00:38 +00:00
try: enclose load operations to initial load span
this makes only sense if we would then have a "new span" start after tenants and timelines have been activated, not doing that now.
This commit is contained in:
@@ -342,16 +342,24 @@ fn start_pageserver(
|
||||
let (init_done_tx, init_done_rx) = utils::completion::channel();
|
||||
|
||||
// Scan the local 'tenants/' directory and start loading the tenants
|
||||
let span = tracing::info_span!("initial load");
|
||||
let init_started_at = std::time::Instant::now();
|
||||
BACKGROUND_RUNTIME.block_on(mgr::init_tenant_mgr(
|
||||
conf,
|
||||
broker_client.clone(),
|
||||
remote_storage.clone(),
|
||||
(init_done_tx, init_done_rx.clone()),
|
||||
))?;
|
||||
|
||||
// initial load started by initializing tenant manager but stopped when initialization is
|
||||
// actually complete
|
||||
BACKGROUND_RUNTIME.block_on(
|
||||
mgr::init_tenant_mgr(
|
||||
conf,
|
||||
broker_client.clone(),
|
||||
remote_storage.clone(),
|
||||
(init_done_tx, init_done_rx.clone()),
|
||||
)
|
||||
.instrument(span.clone()),
|
||||
)?;
|
||||
|
||||
BACKGROUND_RUNTIME.spawn({
|
||||
let init_done_rx = init_done_rx.clone();
|
||||
|
||||
async move {
|
||||
init_done_rx.wait().await;
|
||||
|
||||
@@ -362,6 +370,7 @@ fn start_pageserver(
|
||||
"Initial load completed."
|
||||
);
|
||||
}
|
||||
.instrument(span)
|
||||
});
|
||||
|
||||
// shared state between the disk-usage backed eviction background task and the http endpoint
|
||||
|
||||
@@ -955,8 +955,7 @@ impl Tenant {
|
||||
Ok(())
|
||||
}
|
||||
.instrument({
|
||||
let span = tracing::info_span!(parent: None, "load", tenant_id=%tenant_id);
|
||||
span.follows_from(Span::current());
|
||||
let span = tracing::info_span!("load", tenant_id=%tenant_id);
|
||||
span
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user