aboutsummaryrefslogtreecommitdiff
path: root/src/garage
diff options
context:
space:
mode:
Diffstat (limited to 'src/garage')
-rw-r--r--src/garage/admin.rs8
-rw-r--r--src/garage/cli/structs.rs5
2 files changed, 12 insertions, 1 deletions
diff --git a/src/garage/admin.rs b/src/garage/admin.rs
index 9f4764df..76261050 100644
--- a/src/garage/admin.rs
+++ b/src/garage/admin.rs
@@ -847,6 +847,14 @@ impl AdminRpcHandler {
.await;
Ok(AdminRpc::Ok("Scrub tranquility updated".into()))
}
+ WorkerSetCmd::ResyncNWorkers { n_workers } => {
+ self.garage
+ .block_manager
+ .resync
+ .set_n_workers(n_workers)
+ .await?;
+ Ok(AdminRpc::Ok("Number of resync workers updated".into()))
+ }
WorkerSetCmd::ResyncTranquility { tranquility } => {
self.garage
.block_manager
diff --git a/src/garage/cli/structs.rs b/src/garage/cli/structs.rs
index 1fba934f..0388cef5 100644
--- a/src/garage/cli/structs.rs
+++ b/src/garage/cli/structs.rs
@@ -524,7 +524,10 @@ pub enum WorkerSetCmd {
/// Set tranquility of scrub operations
#[structopt(name = "scrub-tranquility", version = version::garage())]
ScrubTranquility { tranquility: u32 },
- /// Set tranquility of resync operations
+ /// Set number of concurrent block resync workers
+ #[structopt(name = "resync-n-workers", version = version::garage())]
+ ResyncNWorkers { n_workers: usize },
+ /// Set tranquility of block resync operations
#[structopt(name = "resync-tranquility", version = version::garage())]
ResyncTranquility { tranquility: u32 },
}