mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-09 14:19:22 +00:00
Merge branch 'main-v1' into sync-v2-to-v1
This commit is contained in:
@@ -1132,6 +1132,7 @@ pub enum RepairType {
|
||||
Rebalance,
|
||||
Scrub(ScrubCommand),
|
||||
Aliases,
|
||||
ClearResyncQueue,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
|
||||
|
||||
@@ -93,6 +93,15 @@ impl RequestHandler for LocalLaunchRepairOperationRequest {
|
||||
info!("Repairing bucket aliases (foreground)");
|
||||
garage.locked_helper().await.repair_aliases().await?;
|
||||
}
|
||||
RepairType::ClearResyncQueue => {
|
||||
info!("Clearing resync queue (foreground)");
|
||||
let garage = garage.clone();
|
||||
tokio::task::spawn_blocking(move || {
|
||||
garage.block_manager.resync.clear_resync_queue()
|
||||
})
|
||||
.await
|
||||
.map_err(garage_util::error::Error::from)??;
|
||||
}
|
||||
}
|
||||
Ok(LocalLaunchRepairOperationResponse)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user