diff --git a/common/protos/src/generated/proto_gen/node_service.rs b/common/protos/src/generated/proto_gen/node_service.rs index 9dc50d8c..42353e86 100644 --- a/common/protos/src/generated/proto_gen/node_service.rs +++ b/common/protos/src/generated/proto_gen/node_service.rs @@ -1037,7 +1037,6 @@ pub struct LoadRebalanceMetaResponse { } #[derive(Clone, Copy, PartialEq, ::prost::Message)] pub struct LoadTransitionTierConfigRequest {} - #[derive(Clone, PartialEq, ::prost::Message)] pub struct LoadTransitionTierConfigResponse { #[prost(bool, tag = "1")] diff --git a/ecstore/src/heal/heal_ops.rs b/ecstore/src/heal/heal_ops.rs index c75845ff..9a450fe0 100644 --- a/ecstore/src/heal/heal_ops.rs +++ b/ecstore/src/heal/heal_ops.rs @@ -217,14 +217,10 @@ impl HealSequence { } impl HealSequence { - pub fn get_scanned_items_count(&self) -> usize { - self.scanned_items_map.values().sum() - async fn _get_scanned_items_count(&self) -> usize { + pub async fn get_scanned_items_count(&self) -> usize { self.scanned_items_map.read().await.values().sum() } - pub fn _get_scanned_items_map(&self) -> ItemsMap { - self.scanned_items_map.clone() async fn _get_scanned_items_map(&self) -> ItemsMap { self.scanned_items_map.read().await.clone() } @@ -419,12 +415,7 @@ impl HealSequence { async fn heal_rustfs_sys_meta(h: Arc, meta_prefix: &str) -> Result<()> { info!("heal_rustfs_sys_meta, h: {:?}", h); - let layer = new_object_layer_fn(); - let lock = layer.read().await; - let store = match lock.as_ref() { - Some(s) => s, - None => return Err(Error::from(S3Error::with_message(S3ErrorCode::InternalError, "Not init".to_string()))), - }; + let Some(store) = new_object_layer_fn() else { return Err(Error::msg("errServerNotInitialized")) }; let setting = h.setting; store .heal_objects(RUSTFS_META_BUCKET, meta_prefix, &setting, h.clone(), true) diff --git a/madmin/src/heal_command.rs b/madmin/src/heal_command.rs index 0e26f100..b68607c7 100644 --- a/madmin/src/heal_command.rs +++ b/madmin/src/heal_command.rs @@ -47,7 +47,7 @@ pub async fn get_local_background_heal_status() -> (BgHealState, bool) { } let bg_seq = bg_seq.unwrap(); let mut status = BgHealState { - scanned_items_count: bg_seq.read().await.get_scanned_items_count() as u64, + scanned_items_count: bg_seq.get_scanned_items_count().await as u64, ..Default::default() }; let mut heal_disks_map = HashSet::new(); diff --git a/rustfs/src/admin/mod.rs b/rustfs/src/admin/mod.rs index 3e6d4396..ec2982fa 100644 --- a/rustfs/src/admin/mod.rs +++ b/rustfs/src/admin/mod.rs @@ -9,7 +9,7 @@ use s3s::route::S3Route; const ADMIN_PREFIX: &str = "/rustfs/admin"; -pub async fn make_admin_route() -> Result { +pub fn make_admin_route() -> Result { let mut r = S3Router::new(); r.insert(Method::POST, "/", AdminOperation(&handlers::AssumeRoleHandle {}))?;