refactor: prune root runtime compat aliases (#3687)

This commit is contained in:
安正超
2026-06-21 14:39:22 +08:00
committed by GitHub
parent 6bfed0bd43
commit f4f303a773
6 changed files with 59 additions and 19 deletions
+3 -5
View File
@@ -13,9 +13,7 @@
// limitations under the License.
use crate::storage_compat::{
EcstoreError as StorageError,
com::{read_config, save_config},
resolve_object_store_handle,
EcstoreError as StorageError, read_ecstore_config, resolve_object_store_handle, save_ecstore_config,
};
use serde::{Deserialize, Serialize};
use std::sync::atomic::{AtomicBool, Ordering};
@@ -166,7 +164,7 @@ pub(crate) async fn refresh_persisted_module_switches_from_store() -> Result<Per
return Err("storage layer not initialized".to_string());
};
let (config, configured) = match read_config(store, MODULE_SWITCH_CONFIG_PATH).await {
let (config, configured) = match read_ecstore_config(store, MODULE_SWITCH_CONFIG_PATH).await {
Ok(data) => (
serde_json::from_slice::<PersistedModuleSwitches>(&data)
.map_err(|e| format!("failed to deserialize module switch config: {e}"))?,
@@ -188,7 +186,7 @@ pub(crate) async fn save_persisted_module_switches_to_store(config: PersistedMod
};
let data = serde_json::to_vec(&config).map_err(|e| format!("failed to serialize module switch config: {e}"))?;
save_config(store, MODULE_SWITCH_CONFIG_PATH, data)
save_ecstore_config(store, MODULE_SWITCH_CONFIG_PATH, data)
.await
.map_err(|e| format!("failed to save module switch config: {e}"))?;
+2 -3
View File
@@ -14,9 +14,8 @@
use crate::startup_fs_guard::enforce_unsupported_fs_policy;
use crate::storage_compat::{
ECStore, EndpointServerPools, init as init_ecstore_config, init_background_replication, init_global_config_sys,
init_local_disks, init_lock_clients, prewarm_local_disk_id_map, set_global_endpoints, try_migrate_server_config,
update_erasure_type,
ECStore, EndpointServerPools, init_background_replication, init_ecstore_config, init_global_config_sys, init_local_disks,
init_lock_clients, prewarm_local_disk_id_map, set_global_endpoints, try_migrate_server_config, update_erasure_type,
};
use rustfs_common::{GlobalReadiness, SystemStage};
use std::{
+4 -2
View File
@@ -25,8 +25,10 @@ pub(crate) use rustfs_ecstore::api::bucket::replication::{
GLOBAL_REPLICATION_STATS, get_global_replication_pool, init_background_replication,
};
pub(crate) use rustfs_ecstore::api::cluster::topology_snapshot_from_endpoint_pools_with_capabilities;
pub(crate) use rustfs_ecstore::api::config::{com, init, init_global_config_sys, try_migrate_server_config};
pub(crate) use rustfs_ecstore::api::disk::{DiskAPI, RUSTFS_META_BUCKET, endpoint::Endpoint};
pub(crate) use rustfs_ecstore::api::config::com::{read_config as read_ecstore_config, save_config as save_ecstore_config};
pub(crate) use rustfs_ecstore::api::config::{init as init_ecstore_config, init_global_config_sys, try_migrate_server_config};
pub(crate) use rustfs_ecstore::api::disk::endpoint::Endpoint;
pub(crate) use rustfs_ecstore::api::disk::{DiskAPI, RUSTFS_META_BUCKET};
pub(crate) use rustfs_ecstore::api::error::{Error as EcstoreError, Result as EcstoreResult, StorageError};
pub(crate) use rustfs_ecstore::api::event::{EventArgs as EcstoreEventArgs, register_event_dispatch_hook};
pub(crate) use rustfs_ecstore::api::global::{