refactor: clean app storage admin runtime boundaries (#3572)

This commit is contained in:
安正超
2026-06-18 16:42:51 +08:00
committed by GitHub
parent bdb2461b55
commit 8313767f75
49 changed files with 491 additions and 360 deletions
+7 -7
View File
@@ -16,15 +16,15 @@ use crate::config::{RustFSBufferConfig, WorkloadProfile, get_global_buffer_confi
use crate::error::ApiError;
use crate::server::cors;
use crate::storage::ecfs::ListObjectUnorderedQuery;
use crate::storage::storage_compat::ecstore::bucket::metadata_sys;
use crate::storage::storage_compat::ecstore::bucket::metadata_sys::get_replication_config;
use crate::storage::storage_compat::ecstore::bucket::object_lock::objectlock_sys;
use crate::storage::storage_compat::ecstore::bucket::replication::ReplicationConfigurationExt;
use crate::storage::storage_compat::ecstore::error::StorageError;
use crate::storage::storage_compat::ecstore::resolve_object_store_handle;
use http::header::{IF_MATCH, IF_MODIFIED_SINCE, IF_NONE_MATCH, IF_UNMODIFIED_SINCE};
use http::{HeaderMap, HeaderValue, StatusCode};
use metrics::counter;
use rustfs_ecstore::bucket::metadata_sys;
use rustfs_ecstore::bucket::metadata_sys::get_replication_config;
use rustfs_ecstore::bucket::object_lock::objectlock_sys;
use rustfs_ecstore::bucket::replication::ReplicationConfigurationExt;
use rustfs_ecstore::error::StorageError;
use rustfs_ecstore::resolve_object_store_handle;
use rustfs_storage_api::{BucketOperations, BucketOptions};
use rustfs_targets::EventName;
use rustfs_targets::arn::{TargetID, TargetIDError};
@@ -739,7 +739,7 @@ pub(crate) async fn has_replication_rules(bucket: &str, objects: &[ObjectToDelet
}
/// Helper function to get store and validate bucket exists
pub(crate) async fn get_validated_store(bucket: &str) -> S3Result<Arc<rustfs_ecstore::store::ECStore>> {
pub(crate) async fn get_validated_store(bucket: &str) -> S3Result<Arc<crate::storage::storage_compat::ecstore::store::ECStore>> {
let Some(store) = resolve_object_store_handle() else {
return Err(S3Error::with_message(S3ErrorCode::InternalError, "Not init".to_string()));
};