From 9ff243a7a9f4cbd0ecbe6c7140950803d4efcc2d Mon Sep 17 00:00:00 2001 From: junxiang Mu <1948535941@qq.com> Date: Tue, 22 Oct 2024 09:33:11 +0800 Subject: [PATCH] fmt Signed-off-by: junxiang Mu <1948535941@qq.com> --- ecstore/src/heal/heal_commands.rs | 5 +++++ ecstore/src/sets.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ecstore/src/heal/heal_commands.rs b/ecstore/src/heal/heal_commands.rs index d6fff5eb1..8725e66ea 100644 --- a/ecstore/src/heal/heal_commands.rs +++ b/ecstore/src/heal/heal_commands.rs @@ -22,6 +22,11 @@ pub const HEAL_UNKNOWN_SCAN: HealScanMode = 0; pub const HEAL_NORMAL_SCAN: HealScanMode = 1; pub const HEAL_DEEP_SCAN: HealScanMode = 2; +pub const HEAL_ITEM_METADATA: &str = "metadata"; +pub const HEAL_ITEM_BUCKET: &str = "bucket"; +pub const HEAL_ITEM_BUCKET_METADATA: &str = "bucket-metadata"; +pub const HEAL_ITEM_OBJECT: &str = "object"; + #[derive(Clone, Copy, Debug, Default)] pub struct HealOpts { pub recursive: bool, diff --git a/ecstore/src/sets.rs b/ecstore/src/sets.rs index 8267a7061..fdaf7c724 100644 --- a/ecstore/src/sets.rs +++ b/ecstore/src/sets.rs @@ -441,7 +441,7 @@ impl StorageAPI for Sets { unimplemented!() } async fn heal_object(&self, bucket: &str, object: &str, version_id: &str, opts: &HealOpts) -> Result { - unimplemented!() + self.get_disks_by_key(object).heal_object(bucket, object, version_id, opts).await } async fn heal_objects(&self, bucket: &str, prefix: &str, opts: &HealOpts, func: HealObjectFn) -> Result<()> { unimplemented!()