mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-11 07:36:53 +00:00
refactor: prune root bucket compat modules (#3686)
This commit is contained in:
+1
-2
@@ -12,8 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::storage_compat::StorageError;
|
||||
use crate::storage_compat::quota::QuotaError;
|
||||
use crate::storage_compat::{QuotaError, StorageError};
|
||||
use rustfs_storage_api::HTTPRangeError;
|
||||
use s3s::{S3Error, S3ErrorCode};
|
||||
|
||||
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
|
||||
use crate::server::ShutdownHandle;
|
||||
use crate::storage::{process_lambda_configurations, process_queue_configurations, process_topic_configurations};
|
||||
use crate::storage_compat::metadata_sys;
|
||||
use crate::storage_compat::get_notification_config;
|
||||
use crate::{admin, config, version};
|
||||
use rustfs_config::{
|
||||
DEFAULT_BUFFER_MAX_SIZE, DEFAULT_BUFFER_MIN_SIZE, DEFAULT_BUFFER_PROFILE, DEFAULT_BUFFER_UNKNOWN_SIZE, DEFAULT_UPDATE_CHECK,
|
||||
@@ -174,7 +174,7 @@ pub async fn add_bucket_notification_configuration(buckets: Vec<String>) {
|
||||
RUSTFS_REGION
|
||||
});
|
||||
for bucket in buckets.iter() {
|
||||
let has_notification_config = metadata_sys::get_notification_config(bucket).await.unwrap_or_else(|err| {
|
||||
let has_notification_config = get_notification_config(bucket).await.unwrap_or_else(|err| {
|
||||
warn!(
|
||||
target: "rustfs::init",
|
||||
event = "notification_config_load_failed",
|
||||
|
||||
@@ -12,12 +12,18 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub(crate) use rustfs_ecstore::api::bucket::metadata_sys::{get_global_bucket_metadata_sys, init_bucket_metadata_sys};
|
||||
pub(crate) use rustfs_ecstore::api::bucket::metadata::{
|
||||
BUCKET_TABLE_CATALOG_META_PREFIX, BUCKET_TABLE_CATALOG_TABLE_BUCKETS_PREFIX, BUCKET_TABLE_CONFIG,
|
||||
BUCKET_TABLE_RESERVED_PREFIX, table_catalog_path_hash,
|
||||
};
|
||||
pub(crate) use rustfs_ecstore::api::bucket::metadata_sys::{
|
||||
get as get_bucket_metadata, get_global_bucket_metadata_sys, get_notification_config, init_bucket_metadata_sys,
|
||||
};
|
||||
pub(crate) use rustfs_ecstore::api::bucket::migration::{try_migrate_bucket_metadata, try_migrate_iam_config};
|
||||
pub(crate) use rustfs_ecstore::api::bucket::quota::QuotaError;
|
||||
pub(crate) use rustfs_ecstore::api::bucket::replication::{
|
||||
GLOBAL_REPLICATION_STATS, get_global_replication_pool, init_background_replication,
|
||||
};
|
||||
pub(crate) use rustfs_ecstore::api::bucket::{metadata, metadata_sys, quota};
|
||||
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};
|
||||
|
||||
@@ -29,13 +29,9 @@ use std::{
|
||||
|
||||
use crate::storage_compat::RUSTFS_META_BUCKET;
|
||||
use crate::storage_compat::get_lock_acquire_timeout;
|
||||
use crate::storage_compat::{EcstoreError, StorageError};
|
||||
use crate::storage_compat::{
|
||||
metadata::{
|
||||
BUCKET_TABLE_CATALOG_META_PREFIX, BUCKET_TABLE_CATALOG_TABLE_BUCKETS_PREFIX, BUCKET_TABLE_CONFIG,
|
||||
BUCKET_TABLE_RESERVED_PREFIX, table_catalog_path_hash,
|
||||
},
|
||||
metadata_sys,
|
||||
BUCKET_TABLE_CATALOG_META_PREFIX, BUCKET_TABLE_CATALOG_TABLE_BUCKETS_PREFIX, BUCKET_TABLE_CONFIG,
|
||||
BUCKET_TABLE_RESERVED_PREFIX, EcstoreError, StorageError, get_bucket_metadata, table_catalog_path_hash,
|
||||
};
|
||||
use bytes::Bytes;
|
||||
use datafusion::{
|
||||
@@ -7007,7 +7003,7 @@ pub fn validate_object_mutation(table_bucket_enabled: bool, object_key: &str) ->
|
||||
}
|
||||
|
||||
pub(crate) async fn validate_bucket_object_mutation(bucket: &str, object_key: &str) -> Result<(), TableObjectMutationError> {
|
||||
let table_bucket_enabled = metadata_sys::get(bucket)
|
||||
let table_bucket_enabled = get_bucket_metadata(bucket)
|
||||
.await
|
||||
.is_ok_and(|metadata| metadata.table_bucket_enabled());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user