aboutsummaryrefslogtreecommitdiff
path: root/src/garage
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-06-27 16:52:46 +0200
committerAlex Auvolat <alex@adnab.me>2022-06-27 16:52:46 +0200
commit0e5175abeeb1b2d9cfe27603005b7feb3cf040de (patch)
tree0264a8c0a154a9c130ba97062aa3951f33276c05 /src/garage
parentfc507242569a91ee638485848f0fd7def6e026f7 (diff)
downloadgarage-0e5175abeeb1b2d9cfe27603005b7feb3cf040de.tar.gz
garage-0e5175abeeb1b2d9cfe27603005b7feb3cf040de.zip
Report progress of scrub and block repair
Diffstat (limited to 'src/garage')
-rw-r--r--src/garage/admin.rs2
-rw-r--r--src/garage/repair/online.rs13
2 files changed, 8 insertions, 7 deletions
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<Garage>, opt: RepairOpt) -> Result<(), Error> {
+pub fn launch_online_repair(garage: Arc<Garage>, 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<Garage>, 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(())
}
// ----