diff options
author | Alex <lx@deuxfleurs.fr> | 2025-02-05 19:52:00 +0000 |
---|---|---|
committer | Alex <lx@deuxfleurs.fr> | 2025-02-05 19:52:00 +0000 |
commit | d3226bfa91d4500063c5c287c6256729dcbb3f88 (patch) | |
tree | f27dad5a52a165d91edc4ffbddca16d2b1015249 /src/garage/repair | |
parent | 47e87c8739d7f0d420ea6a01fea99e638414baeb (diff) | |
parent | af67626ab2bd32e94ab521607574737939a7edf3 (diff) | |
download | garage-main.tar.gz garage-main.zip |
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/952
Diffstat (limited to 'src/garage/repair')
-rw-r--r-- | src/garage/repair/online.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/garage/repair/online.rs b/src/garage/repair/online.rs index 2c5227d2..47883f97 100644 --- a/src/garage/repair/online.rs +++ b/src/garage/repair/online.rs @@ -1,3 +1,4 @@ +use std::future::Future; use std::sync::Arc; use std::time::Duration; @@ -93,17 +94,16 @@ pub async fn launch_online_repair( // ---- -#[async_trait] trait TableRepair: Send + Sync + 'static { type T: TableSchema; fn table(garage: &Garage) -> &Table<Self::T, TableShardedReplication>; - async fn process( + fn process( &mut self, garage: &Garage, entry: <<Self as TableRepair>::T as TableSchema>::E, - ) -> Result<bool, Error>; + ) -> impl Future<Output = Result<bool, Error>> + Send; } struct TableRepairWorker<T: TableRepair> { @@ -174,7 +174,6 @@ impl<R: TableRepair> Worker for TableRepairWorker<R> { struct RepairVersions; -#[async_trait] impl TableRepair for RepairVersions { type T = VersionTable; @@ -221,7 +220,6 @@ impl TableRepair for RepairVersions { struct RepairBlockRefs; -#[async_trait] impl TableRepair for RepairBlockRefs { type T = BlockRefTable; @@ -257,7 +255,6 @@ impl TableRepair for RepairBlockRefs { struct RepairMpu; -#[async_trait] impl TableRepair for RepairMpu { type T = MultipartUploadTable; |