From 0e5175abeeb1b2d9cfe27603005b7feb3cf040de Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 27 Jun 2022 16:52:46 +0200 Subject: Report progress of scrub and block repair --- src/garage/admin.rs | 2 +- src/garage/repair/online.rs | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src/garage') diff --git a/src/garage/admin.rs b/src/garage/admin.rs index 9c6a0c57..de49331e 100644 --- a/src/garage/admin.rs +++ b/src/garage/admin.rs @@ -698,7 +698,7 @@ impl AdminRpcHandler { ))) } } else { - launch_online_repair(self.garage.clone(), opt).await?; + launch_online_repair(self.garage.clone(), opt); Ok(AdminRpc::Ok(format!( "Repair launched on {:?}", self.garage.system.id diff --git a/src/garage/repair/online.rs b/src/garage/repair/online.rs index a5ccfa02..b0437c5e 100644 --- a/src/garage/repair/online.rs +++ b/src/garage/repair/online.rs @@ -13,7 +13,7 @@ use garage_util::error::Error; use crate::*; -pub async fn launch_online_repair(garage: Arc, opt: RepairOpt) -> Result<(), Error> { +pub fn launch_online_repair(garage: Arc, opt: RepairOpt) { match opt.what { RepairWhat::Tables => { info!("Launching a full sync of tables"); @@ -45,13 +45,14 @@ pub async fn launch_online_repair(garage: Arc, opt: RepairOpt) -> Result } RepairWhat::Scrub { tranquility } => { info!("Verifying integrity of stored blocks"); - garage.background.spawn_worker( - garage_block::repair::ScrubWorker::new(garage.block_manager.clone(), tranquility) - .await?, - ); + garage + .background + .spawn_worker(garage_block::repair::ScrubWorker::new( + garage.block_manager.clone(), + tranquility, + )); } } - Ok(()) } // ---- -- cgit v1.2.3