mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-16 18:02:56 +00:00
Instrument the task, not the await
This commit is contained in:
@@ -146,8 +146,8 @@ pub fn init_tenant_task_pool() -> anyhow::Result<()> {
|
||||
|
||||
// Spawn new task, request cancellation of the old one if exists
|
||||
let (cancel_send, cancel_recv) = watch::channel(());
|
||||
let _handle = tokio::spawn(gc_loop(tenantid, cancel_recv))
|
||||
.instrument(trace_span!("gc loop", tenant = %tenantid));
|
||||
let _handle = tokio::spawn(gc_loop(tenantid, cancel_recv)
|
||||
.instrument(trace_span!("gc loop", tenant = %tenantid)));
|
||||
if let Some(old_cancel_send) = gc_loops.insert(tenantid, cancel_send) {
|
||||
old_cancel_send.send(()).ok();
|
||||
}
|
||||
@@ -157,8 +157,8 @@ pub fn init_tenant_task_pool() -> anyhow::Result<()> {
|
||||
|
||||
// Spawn new task, request cancellation of the old one if exists
|
||||
let (cancel_send, cancel_recv) = watch::channel(());
|
||||
let _handle = tokio::spawn(compaction_loop(tenantid, cancel_recv))
|
||||
.instrument(trace_span!("compaction loop", tenant = %tenantid));
|
||||
let _handle = tokio::spawn(compaction_loop(tenantid, cancel_recv)
|
||||
.instrument(trace_span!("compaction loop", tenant = %tenantid)));
|
||||
if let Some(old_cancel_send) = compaction_loops.insert(tenantid, cancel_send) {
|
||||
old_cancel_send.send(()).ok();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user