mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 09:40:32 +00:00
@@ -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")]
|
||||
|
||||
@@ -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<HealSequence>, 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)
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -9,7 +9,7 @@ use s3s::route::S3Route;
|
||||
|
||||
const ADMIN_PREFIX: &str = "/rustfs/admin";
|
||||
|
||||
pub async fn make_admin_route() -> Result<impl S3Route> {
|
||||
pub fn make_admin_route() -> Result<impl S3Route> {
|
||||
let mut r = S3Router::new();
|
||||
|
||||
r.insert(Method::POST, "/", AdminOperation(&handlers::AssumeRoleHandle {}))?;
|
||||
|
||||
Reference in New Issue
Block a user