From 4a0ae26512e0dfcb03d32745270de4d723fcd163 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Tue, 13 Aug 2024 19:55:55 +0000 Subject: [PATCH] log more when invoking region replacement start saga --- .../region_snapshot_replacement_start.rs | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/nexus/src/app/background/tasks/region_snapshot_replacement_start.rs b/nexus/src/app/background/tasks/region_snapshot_replacement_start.rs index 0b9aa41cf9..d05bc433a7 100644 --- a/nexus/src/app/background/tasks/region_snapshot_replacement_start.rs +++ b/nexus/src/app/background/tasks/region_snapshot_replacement_start.rs @@ -185,25 +185,40 @@ impl RegionSnapshotReplacementDetector { let result = self .send_start_request( authn::saga::Serialized::for_opctx(opctx), - request, + request.clone(), ) .await; match result { Ok(()) => { - let s = format!("start invoked ok for {request_id}"); + let s = format!( + "region snapshot replacement start invoked ok for \ + {request_id}" + ); - info!(&log, "{s}"); + info!( + &log, + "{s}"; + "request.snapshot_id" => %request.old_snapshot_id, + "request.region_id" => %request.old_region_id, + "request.dataset_id" => %request.old_dataset_id, + ); status.start_invoked_ok.push(s); } Err(e) => { let s = format!( - "sending region snapshot replacement request failed: \ - {e}", + "invoking region snapshot replacement start for \ + {request_id} failed: {e}", ); - error!(&log, "{s}"); + error!( + &log, + "{s}"; + "request.snapshot_id" => %request.old_snapshot_id, + "request.region_id" => %request.old_region_id, + "request.dataset_id" => %request.old_dataset_id, + ); status.errors.push(s); } }