mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-16 18:08:21 +00:00
fix(ecstore): remove unused mirror fields (#4019)
This commit is contained in:
@@ -2419,12 +2419,6 @@ async fn test_init_and_start_rebalance_rejects_second_start_after_gate() {
|
|||||||
decommission_cancelers: tokio::sync::RwLock::new(Vec::new()),
|
decommission_cancelers: tokio::sync::RwLock::new(Vec::new()),
|
||||||
start_gate: tokio::sync::Mutex::new(()),
|
start_gate: tokio::sync::Mutex::new(()),
|
||||||
pool_meta_save_gate: tokio::sync::Mutex::new(()),
|
pool_meta_save_gate: tokio::sync::Mutex::new(()),
|
||||||
local_disk_map: crate::runtime::global::GLOBAL_LOCAL_DISK_MAP.clone(),
|
|
||||||
local_disk_id_map: crate::runtime::global::GLOBAL_LOCAL_DISK_ID_MAP.clone(),
|
|
||||||
local_disk_set_drives: crate::runtime::global::GLOBAL_LOCAL_DISK_SET_DRIVES.clone(),
|
|
||||||
tier_config_mgr: crate::services::tier::tier::TierConfigMgr::new(),
|
|
||||||
event_notifier: crate::services::event_notification::EventNotifier::new(),
|
|
||||||
bucket_monitor: std::sync::OnceLock::new(),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
let err = store
|
let err = store
|
||||||
|
|||||||
@@ -317,13 +317,6 @@ impl ECStore {
|
|||||||
decommission_cancelers,
|
decommission_cancelers,
|
||||||
start_gate: tokio::sync::Mutex::new(()),
|
start_gate: tokio::sync::Mutex::new(()),
|
||||||
pool_meta_save_gate: tokio::sync::Mutex::new(()),
|
pool_meta_save_gate: tokio::sync::Mutex::new(()),
|
||||||
|
|
||||||
local_disk_map: runtime_sources::local_disk_map_handle(),
|
|
||||||
local_disk_id_map: runtime_sources::local_disk_id_map_handle(),
|
|
||||||
local_disk_set_drives: runtime_sources::local_disk_set_drives_handle(),
|
|
||||||
tier_config_mgr: runtime_sources::tier_config_mgr_handle(),
|
|
||||||
event_notifier: runtime_sources::event_notifier_handle(),
|
|
||||||
bucket_monitor: OnceLock::new(),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Only set it when the global deployment ID is not yet configured
|
// Only set it when the global deployment ID is not yet configured
|
||||||
@@ -353,10 +346,6 @@ impl ECStore {
|
|||||||
|
|
||||||
runtime_sources::publish_object_store(ec.clone()).await;
|
runtime_sources::publish_object_store(ec.clone()).await;
|
||||||
|
|
||||||
if let Some(monitor) = runtime_sources::bucket_monitor() {
|
|
||||||
let _ = ec.bucket_monitor.set(monitor);
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(ec)
|
Ok(ec)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
#![allow(clippy::map_entry)]
|
#![allow(clippy::map_entry)]
|
||||||
|
|
||||||
use crate::bucket::bandwidth::monitor::Monitor;
|
|
||||||
use crate::bucket::lifecycle::bucket_lifecycle_audit::LcEventSrc;
|
use crate::bucket::lifecycle::bucket_lifecycle_audit::LcEventSrc;
|
||||||
use crate::bucket::lifecycle::bucket_lifecycle_ops::{
|
use crate::bucket::lifecycle::bucket_lifecycle_ops::{
|
||||||
enqueue_immediate_expiry, enqueue_transition_immediate, init_background_expiry,
|
enqueue_immediate_expiry, enqueue_transition_immediate, init_background_expiry,
|
||||||
@@ -42,11 +41,9 @@ use crate::error::{
|
|||||||
StorageError, is_err_bucket_exists, is_err_bucket_not_found, is_err_invalid_upload_id, is_err_object_not_found,
|
StorageError, is_err_bucket_exists, is_err_bucket_not_found, is_err_invalid_upload_id, is_err_object_not_found,
|
||||||
is_err_read_quorum, is_err_version_not_found, to_object_err,
|
is_err_read_quorum, is_err_version_not_found, to_object_err,
|
||||||
};
|
};
|
||||||
use crate::runtime::global::{DISK_RESERVE_FRACTION, TypeLocalDiskSetDrives};
|
use crate::runtime::global::DISK_RESERVE_FRACTION;
|
||||||
use crate::runtime::sources as runtime_sources;
|
use crate::runtime::sources as runtime_sources;
|
||||||
use crate::services::event_notification::EventNotifier;
|
|
||||||
use crate::services::rebalance::RebalanceMeta;
|
use crate::services::rebalance::RebalanceMeta;
|
||||||
use crate::services::tier::tier::TierConfigMgr;
|
|
||||||
use crate::storage_api_contracts::{
|
use crate::storage_api_contracts::{
|
||||||
bucket::{BucketInfo, BucketOperations, BucketOptions, DeleteBucketOptions, MakeBucketOptions},
|
bucket::{BucketInfo, BucketOperations, BucketOptions, DeleteBucketOptions, MakeBucketOptions},
|
||||||
list::{StorageListObjectVersionsInfo, StorageListObjectsV2Info, StorageObjectInfoOrErr, StorageWalkOptions},
|
list::{StorageListObjectVersionsInfo, StorageListObjectsV2Info, StorageObjectInfoOrErr, StorageWalkOptions},
|
||||||
@@ -75,11 +72,7 @@ use rustfs_utils::path::{decode_dir_object, encode_dir_object, path_join_buf};
|
|||||||
use s3s::dto::{BucketVersioningStatus, ObjectLockConfiguration, ObjectLockEnabled, VersioningConfiguration};
|
use s3s::dto::{BucketVersioningStatus, ObjectLockConfiguration, ObjectLockEnabled, VersioningConfiguration};
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
use std::{
|
use std::{collections::HashMap, sync::Arc, time::Duration};
|
||||||
collections::HashMap,
|
|
||||||
sync::{Arc, OnceLock},
|
|
||||||
time::Duration,
|
|
||||||
};
|
|
||||||
use time::OffsetDateTime;
|
use time::OffsetDateTime;
|
||||||
use tokio::select;
|
use tokio::select;
|
||||||
use tokio::sync::{Mutex, RwLock};
|
use tokio::sync::{Mutex, RwLock};
|
||||||
@@ -192,18 +185,6 @@ pub struct ECStore {
|
|||||||
/// The saver then clones the latest `pool_meta` under a short read lock and
|
/// The saver then clones the latest `pool_meta` under a short read lock and
|
||||||
/// releases it before awaiting disk writes.
|
/// releases it before awaiting disk writes.
|
||||||
pub(crate) pool_meta_save_gate: Mutex<()>,
|
pub(crate) pool_meta_save_gate: Mutex<()>,
|
||||||
|
|
||||||
// Phase 2 migration pending - do not use directly.
|
|
||||||
/// Local disk maps (migrated from GLOBAL_LOCAL_DISK_MAP/ID_MAP/SET_DRIVES)
|
|
||||||
pub(crate) local_disk_map: Arc<RwLock<HashMap<String, Option<DiskStore>>>>,
|
|
||||||
pub(crate) local_disk_id_map: Arc<RwLock<HashMap<Uuid, String>>>,
|
|
||||||
pub(crate) local_disk_set_drives: Arc<RwLock<TypeLocalDiskSetDrives>>,
|
|
||||||
/// Tier config manager (migrated from GLOBAL_TierConfigMgr)
|
|
||||||
pub(crate) tier_config_mgr: Arc<RwLock<TierConfigMgr>>,
|
|
||||||
/// Event notifier (migrated from GLOBAL_EventNotifier)
|
|
||||||
pub(crate) event_notifier: Arc<RwLock<EventNotifier>>,
|
|
||||||
/// Bucket monitor (migrated from GLOBAL_BUCKET_MONITOR)
|
|
||||||
pub(crate) bucket_monitor: OnceLock<Arc<Monitor>>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl std::fmt::Debug for ECStore {
|
impl std::fmt::Debug for ECStore {
|
||||||
|
|||||||
Reference in New Issue
Block a user