diff options
author | Alex Auvolat <lx@deuxfleurs.fr> | 2025-02-05 19:37:38 +0100 |
---|---|---|
committer | Alex Auvolat <lx@deuxfleurs.fr> | 2025-02-05 19:37:38 +0100 |
commit | 7c8fc04b9645d4cbccd30749735d30aad18c9575 (patch) | |
tree | 9a61083c2d2b4247703a04976f6ba0baa162bfd2 /src/api/admin/repair.rs | |
parent | f914db057a85e0fa70f319ee3af85998a551af96 (diff) | |
download | garage-refactor-admin.tar.gz garage-refactor-admin.zip |
massively speed up compilation of garage_api_admin by not using async_traitrefactor-admin
Diffstat (limited to 'src/api/admin/repair.rs')
-rw-r--r-- | src/api/admin/repair.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/api/admin/repair.rs b/src/api/admin/repair.rs index 19bb4d51..113ef636 100644 --- a/src/api/admin/repair.rs +++ b/src/api/admin/repair.rs @@ -27,7 +27,6 @@ use crate::{Admin, RequestHandler}; const RC_REPAIR_ITER_COUNT: usize = 64; -#[async_trait] impl RequestHandler for LocalLaunchRepairOperationRequest { type Response = LocalLaunchRepairOperationResponse; @@ -96,17 +95,16 @@ impl RequestHandler for LocalLaunchRepairOperationRequest { // ---- -#[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, GarageError>; + ) -> impl std::future::Future<Output = Result<bool, GarageError>> + Send; } struct TableRepairWorker<T: TableRepair> { @@ -180,7 +178,6 @@ impl<R: TableRepair> Worker for TableRepairWorker<R> { struct RepairVersions; -#[async_trait] impl TableRepair for RepairVersions { type T = VersionTable; @@ -227,7 +224,6 @@ impl TableRepair for RepairVersions { struct RepairBlockRefs; -#[async_trait] impl TableRepair for RepairBlockRefs { type T = BlockRefTable; @@ -267,7 +263,6 @@ impl TableRepair for RepairBlockRefs { struct RepairMpu; -#[async_trait] impl TableRepair for RepairMpu { type T = MultipartUploadTable; |