refactor: use relative local compat paths (#3719)

This commit is contained in:
安正超
2026-06-22 11:13:37 +08:00
committed by GitHub
parent abb5f41726
commit 30fa7e2ad4
9 changed files with 114 additions and 75 deletions
+16 -14
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
pub(crate) use crate::admin::storage_compat::{
pub(crate) use super::super::storage_compat::{
AdminError, AdminReplicationConfigExt, AdminVersioningConfigExt, CollectMetricsOpts, DailyAllTierStats, DiskStat, ECStore,
ERR_TIER_ALREADY_EXISTS, ERR_TIER_BACKEND_IN_USE, ERR_TIER_BACKEND_NOT_EMPTY, ERR_TIER_CONNECT_ERR,
ERR_TIER_INVALID_CREDENTIALS, ERR_TIER_MISSING_CREDENTIALS, ERR_TIER_NAME_NOT_UPPERCASE, ERR_TIER_NOT_FOUND,
@@ -24,25 +24,25 @@ pub(crate) use crate::admin::storage_compat::{
};
#[cfg(test)]
pub(crate) use crate::admin::storage_compat::{Endpoint, Endpoints, PoolEndpoints, RebalStatus, RebalanceInfo};
pub(crate) use super::super::storage_compat::{Endpoint, Endpoints, PoolEndpoints, RebalStatus, RebalanceInfo};
pub(crate) mod bucket_target_sys {
pub(crate) use crate::admin::storage_compat::bucket_target_sys::{BucketTargetError, BucketTargetSys};
pub(crate) use super::super::super::storage_compat::bucket_target_sys::{BucketTargetError, BucketTargetSys};
}
pub(crate) mod lifecycle {
pub(crate) mod bucket_lifecycle_ops {
pub(crate) use crate::admin::storage_compat::lifecycle::bucket_lifecycle_ops::GLOBAL_TransitionState;
pub(crate) use super::super::super::super::storage_compat::lifecycle::bucket_lifecycle_ops::GLOBAL_TransitionState;
}
pub(crate) mod tier_last_day_stats {
#[cfg(test)]
pub(crate) use crate::admin::storage_compat::lifecycle::tier_last_day_stats::LastDayTierStats;
pub(crate) use super::super::super::super::storage_compat::lifecycle::tier_last_day_stats::LastDayTierStats;
}
}
pub(crate) mod metadata {
pub(crate) use crate::admin::storage_compat::metadata::{
pub(crate) use super::super::super::storage_compat::metadata::{
BUCKET_CORS_CONFIG, BUCKET_LIFECYCLE_CONFIG, BUCKET_NOTIFICATION_CONFIG, BUCKET_POLICY_CONFIG, BUCKET_QUOTA_CONFIG_FILE,
BUCKET_REPLICATION_CONFIG, BUCKET_SSECONFIG, BUCKET_TAGGING_CONFIG, BUCKET_TARGETS_FILE, BUCKET_VERSIONING_CONFIG,
BucketMetadata, OBJECT_LOCK_CONFIG, table_catalog_path_hash,
@@ -50,7 +50,7 @@ pub(crate) mod metadata {
}
pub(crate) mod metadata_sys {
pub(crate) use crate::admin::storage_compat::metadata_sys::{
pub(crate) use super::super::super::storage_compat::metadata_sys::{
BucketMetadataSys, delete, get, get_bucket_policy, get_bucket_targets_config, get_config_from_disk, get_lifecycle_config,
get_notification_config, get_object_lock_config, get_quota_config, get_replication_config, get_sse_config,
get_tagging_config, get_versioning_config, list_bucket_targets, update,
@@ -58,33 +58,35 @@ pub(crate) mod metadata_sys {
}
pub(crate) mod quota {
pub(crate) use crate::admin::storage_compat::quota::{BucketQuota, QuotaError, QuotaOperation};
pub(crate) use super::super::super::storage_compat::quota::{BucketQuota, QuotaError, QuotaOperation};
pub(crate) mod checker {
pub(crate) use crate::admin::storage_compat::quota::checker::QuotaChecker;
pub(crate) use super::super::super::super::storage_compat::quota::checker::QuotaChecker;
}
}
pub(crate) mod replication {
pub(crate) use crate::admin::storage_compat::replication::{
pub(crate) use super::super::super::storage_compat::replication::{
BucketStats, GLOBAL_REPLICATION_STATS, ResyncOpts, get_global_replication_pool,
};
}
pub(crate) mod storageclass {
pub(crate) use crate::admin::storage_compat::storageclass::{
pub(crate) use super::super::super::storage_compat::storageclass::{
INLINE_BLOCK_ENV, OPTIMIZE_ENV, RRS, RRS_ENV, STANDARD, STANDARD_ENV,
};
}
pub(crate) mod target {
pub(crate) use crate::admin::storage_compat::target::{ARN, BucketTarget, BucketTargetType, BucketTargets, Credentials};
pub(crate) use super::super::super::storage_compat::target::{
ARN, BucketTarget, BucketTargetType, BucketTargets, Credentials,
};
}
pub(crate) mod utils {
pub(crate) use crate::admin::storage_compat::utils::{deserialize, is_valid_object_prefix, serialize};
pub(crate) use super::super::super::storage_compat::utils::{deserialize, is_valid_object_prefix, serialize};
}
pub(crate) mod versioning_sys {
pub(crate) use crate::admin::storage_compat::versioning_sys::BucketVersioningSys;
pub(crate) use super::super::super::storage_compat::versioning_sys::BucketVersioningSys;
}
+9 -9
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
pub(crate) use crate::admin::storage_compat::{
pub(crate) use super::storage_compat::{
AdminReplicationConfigExt, AdminVersioningConfigExt, GLOBAL_BOOT_TIME, PeerRestClient, StorageError,
get_global_bucket_monitor, get_global_deployment_id, get_global_notification_sys, get_global_region,
read_admin_config_without_migrate,
@@ -20,35 +20,35 @@ pub(crate) use crate::admin::storage_compat::{
pub(crate) mod bandwidth {
pub(crate) mod monitor {
pub(crate) use crate::admin::storage_compat::bandwidth::monitor::BandwidthDetails;
pub(crate) use super::super::super::storage_compat::bandwidth::monitor::BandwidthDetails;
}
}
pub(crate) mod bucket_target_sys {
pub(crate) use crate::admin::storage_compat::bucket_target_sys::{
pub(crate) use super::super::storage_compat::bucket_target_sys::{
AdvancedPutOptions, BucketTargetSys, PutObjectOptions, RemoveObjectOptions, S3ClientError, TargetClient,
};
}
pub(crate) mod metadata {
pub(crate) use crate::admin::storage_compat::metadata::BUCKET_TARGETS_FILE;
pub(crate) use super::super::storage_compat::metadata::BUCKET_TARGETS_FILE;
}
pub(crate) use crate::admin::storage_compat::metadata_sys;
pub(crate) use super::storage_compat::metadata_sys;
pub(crate) mod replication {
pub(crate) use crate::admin::storage_compat::replication::{
pub(crate) use super::super::storage_compat::replication::{
BucketReplicationResyncStatus, BucketStats, GLOBAL_REPLICATION_STATS, ObjectOpts, ResyncOpts, get_global_replication_pool,
};
#[cfg(test)]
pub(crate) use crate::admin::storage_compat::replication::{ResyncStatusType, TargetReplicationResyncStatus};
pub(crate) use super::super::storage_compat::replication::{ResyncStatusType, TargetReplicationResyncStatus};
}
pub(crate) mod target {
pub(crate) use crate::admin::storage_compat::target::{BucketTarget, BucketTargetType, BucketTargets};
pub(crate) use super::super::storage_compat::target::{BucketTarget, BucketTargetType, BucketTargets};
}
pub(crate) mod versioning_sys {
pub(crate) use crate::admin::storage_compat::versioning_sys::BucketVersioningSys;
pub(crate) use super::super::storage_compat::versioning_sys::BucketVersioningSys;
}
+4 -4
View File
@@ -12,19 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.
pub(crate) use crate::admin::storage_compat::{
pub(crate) use super::super::storage_compat::{
Error, STORAGE_CLASS_SUB_SYS, get_global_notification_sys, read_admin_config, read_admin_config_without_migrate,
save_admin_config, set_global_storage_class,
};
#[cfg(test)]
pub(crate) use crate::admin::storage_compat::init_admin_config_defaults;
pub(crate) use super::super::storage_compat::init_admin_config_defaults;
#[cfg(test)]
pub(crate) mod metadata {
pub(crate) use crate::admin::storage_compat::metadata::{BUCKET_LIFECYCLE_CONFIG, BUCKET_REPLICATION_CONFIG};
pub(crate) use super::super::super::storage_compat::metadata::{BUCKET_LIFECYCLE_CONFIG, BUCKET_REPLICATION_CONFIG};
}
pub(crate) mod storageclass {
pub(crate) use crate::admin::storage_compat::storageclass::lookup_config;
pub(crate) use super::super::super::storage_compat::storageclass::lookup_config;
}
+3 -3
View File
@@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
pub(crate) use crate::app::storage_compat::{
pub(crate) use super::super::storage_compat::{
ECStore, EndpointServerPools, TierConfigMgr, get_global_endpoints_opt, get_global_region, get_global_tier_config_mgr,
new_object_layer_fn, set_object_store_resolver,
};
pub(crate) mod metadata_sys {
pub(crate) use crate::app::storage_compat::metadata_sys::{BucketMetadataSys, get_global_bucket_metadata_sys};
pub(crate) use super::super::super::storage_compat::metadata_sys::{BucketMetadataSys, get_global_bucket_metadata_sys};
}
#[cfg(test)]
pub(crate) use crate::app::storage_compat::{Endpoint, Endpoints, PoolEndpoints, init_local_disks};
pub(crate) use super::super::storage_compat::{Endpoint, Endpoints, PoolEndpoints, init_local_disks};
+29 -29
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
pub(crate) use crate::app::storage_compat::{
pub(crate) use super::storage_compat::{
AppObjectLockConfigExt, AppReplicationConfigExt, AppVersioningConfigExt, DiskError, DynReader, ECStore, EndpointServerPools,
Error, HashReader, MIN_DISK_COMPRESSIBLE_SIZE, PoolDecommissionInfo, PoolStatus, StorageError, WriteEncryption, WritePlan,
apply_bucket_usage_memory_overlay, compression_metadata_value, get_global_notification_sys, get_lock_acquire_timeout,
@@ -23,137 +23,137 @@ pub(crate) use crate::app::storage_compat::{
};
#[cfg(test)]
pub(crate) use crate::app::storage_compat::{
pub(crate) use super::storage_compat::{
AppWarmBackend, DecryptReader, EncryptReader, Endpoint, Endpoints, GLOBAL_TierConfigMgr, HardLimitReader, PoolEndpoints,
TierConfig, TierType, WarmBackendGetOpts, boxed_reader, init_local_disks,
};
pub(crate) mod bucket_target_sys {
pub(crate) use crate::app::storage_compat::bucket_target_sys::BucketTargetSys;
pub(crate) use super::super::storage_compat::bucket_target_sys::BucketTargetSys;
}
pub(crate) mod lifecycle {
pub(crate) mod bucket_lifecycle_audit {
pub(crate) use crate::app::storage_compat::lifecycle::bucket_lifecycle_audit::LcEventSrc;
pub(crate) use super::super::super::storage_compat::lifecycle::bucket_lifecycle_audit::LcEventSrc;
}
pub(crate) mod bucket_lifecycle_ops {
pub(crate) use crate::app::storage_compat::lifecycle::bucket_lifecycle_ops::{
pub(crate) use super::super::super::storage_compat::lifecycle::bucket_lifecycle_ops::{
GLOBAL_ExpiryState, enqueue_expiry_for_existing_objects, enqueue_transition_for_existing_objects,
enqueue_transition_immediate, post_restore_opts, validate_lifecycle_config, validate_transition_tier,
};
#[cfg(test)]
pub(crate) use crate::app::storage_compat::lifecycle::bucket_lifecycle_ops::init_background_expiry;
pub(crate) use super::super::super::storage_compat::lifecycle::bucket_lifecycle_ops::init_background_expiry;
}
pub(crate) mod lifecycle_contract {
pub(crate) use crate::app::storage_compat::lifecycle::lifecycle::{
pub(crate) use super::super::super::storage_compat::lifecycle::lifecycle::{
Event, ObjectOpts, TRANSITION_COMPLETE, TransitionOptions, expected_expiry_time,
};
#[cfg(test)]
pub(crate) use crate::app::storage_compat::lifecycle::lifecycle::IlmAction;
pub(crate) use super::super::super::storage_compat::lifecycle::lifecycle::IlmAction;
}
pub(crate) use lifecycle_contract as lifecycle;
pub(crate) mod tier_delete_journal {
pub(crate) use crate::app::storage_compat::lifecycle::tier_delete_journal::persist_tier_delete_journal_entry;
pub(crate) use super::super::super::storage_compat::lifecycle::tier_delete_journal::persist_tier_delete_journal_entry;
}
pub(crate) mod tier_sweeper {
pub(crate) use crate::app::storage_compat::lifecycle::tier_sweeper::{
pub(crate) use super::super::super::storage_compat::lifecycle::tier_sweeper::{
transitioned_delete_journal_entry, transitioned_force_delete_journal_entry,
};
}
}
pub(crate) mod metadata {
pub(crate) use crate::app::storage_compat::metadata::{
pub(crate) use super::super::storage_compat::metadata::{
BUCKET_CORS_CONFIG, BUCKET_LIFECYCLE_CONFIG, BUCKET_NOTIFICATION_CONFIG, BUCKET_POLICY_CONFIG,
BUCKET_PUBLIC_ACCESS_BLOCK_CONFIG, BUCKET_REPLICATION_CONFIG, BUCKET_SSECONFIG, BUCKET_TAGGING_CONFIG,
BUCKET_TARGETS_FILE, BUCKET_VERSIONING_CONFIG,
};
#[cfg(test)]
pub(crate) use crate::app::storage_compat::metadata::OBJECT_LOCK_CONFIG;
pub(crate) use super::super::storage_compat::metadata::OBJECT_LOCK_CONFIG;
}
pub(crate) mod metadata_sys {
pub(crate) use crate::app::storage_compat::metadata_sys::{
pub(crate) use super::super::storage_compat::metadata_sys::{
BucketMetadataSys, delete, get_bucket_policy, get_bucket_policy_raw, get_bucket_targets_config, get_cors_config,
get_lifecycle_config, get_notification_config, get_object_lock_config, get_public_access_block_config,
get_replication_config, get_sse_config, get_tagging_config, update,
};
#[cfg(test)]
pub(crate) use crate::app::storage_compat::metadata_sys::init_bucket_metadata_sys;
pub(crate) use super::super::storage_compat::metadata_sys::init_bucket_metadata_sys;
}
pub(crate) mod object_api_utils {
pub(crate) use crate::app::storage_compat::object_api_utils::to_s3s_etag;
pub(crate) use super::super::storage_compat::object_api_utils::to_s3s_etag;
}
pub(crate) mod object_lock {
pub(crate) mod objectlock {
pub(crate) use crate::app::storage_compat::object_lock::objectlock::{
pub(crate) use super::super::super::storage_compat::object_lock::objectlock::{
get_object_legalhold_meta, get_object_retention_meta,
};
}
pub(crate) mod objectlock_sys {
pub(crate) use crate::app::storage_compat::object_lock::objectlock_sys::{
pub(crate) use super::super::super::storage_compat::object_lock::objectlock_sys::{
BucketObjectLockSys, check_object_lock_for_deletion, is_retention_active,
};
}
}
pub(crate) mod policy_sys {
pub(crate) use crate::app::storage_compat::policy_sys::PolicySys;
pub(crate) use super::super::storage_compat::policy_sys::PolicySys;
}
pub(crate) mod quota {
pub(crate) use crate::app::storage_compat::quota::QuotaOperation;
pub(crate) use super::super::storage_compat::quota::QuotaOperation;
pub(crate) mod checker {
pub(crate) use crate::app::storage_compat::quota::checker::QuotaChecker;
pub(crate) use super::super::super::storage_compat::quota::checker::QuotaChecker;
}
}
pub(crate) mod replication {
pub(crate) use crate::app::storage_compat::replication::{
pub(crate) use super::super::storage_compat::replication::{
DeletedObjectReplicationInfo, ObjectOpts, check_replicate_delete, get_must_replicate_options, must_replicate,
schedule_replication, schedule_replication_delete,
};
}
pub(crate) mod storageclass {
pub(crate) use crate::app::storage_compat::storageclass::STANDARD;
pub(crate) use super::super::storage_compat::storageclass::STANDARD;
#[cfg(test)]
pub(crate) use crate::app::storage_compat::storageclass::STANDARD_IA;
pub(crate) use super::super::storage_compat::storageclass::STANDARD_IA;
}
pub(crate) mod tagging {
pub(crate) use crate::app::storage_compat::tagging::decode_tags;
pub(crate) use super::super::storage_compat::tagging::decode_tags;
}
pub(crate) mod target {
pub(crate) use crate::app::storage_compat::target::{BucketTargetType, BucketTargets};
pub(crate) use super::super::storage_compat::target::{BucketTargetType, BucketTargets};
#[cfg(test)]
pub(crate) use crate::app::storage_compat::target::BucketTarget;
pub(crate) use super::super::storage_compat::target::BucketTarget;
}
#[cfg(test)]
pub(crate) mod transition_api {
pub(crate) use crate::app::storage_compat::transition_api::{ReadCloser, ReaderImpl};
pub(crate) use super::super::storage_compat::transition_api::{ReadCloser, ReaderImpl};
}
pub(crate) mod utils {
pub(crate) use crate::app::storage_compat::utils::serialize;
pub(crate) use super::super::storage_compat::utils::serialize;
}
pub(crate) mod versioning_sys {
pub(crate) use crate::app::storage_compat::versioning_sys::BucketVersioningSys;
pub(crate) use super::super::storage_compat::versioning_sys::BucketVersioningSys;
}
+2 -2
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
pub(crate) use crate::storage::storage_compat::{
pub(crate) use super::storage_compat::{
BUCKET_ACCELERATE_CONFIG, BUCKET_LOGGING_CONFIG, BUCKET_REQUEST_PAYMENT_CONFIG, BUCKET_VERSIONING_CONFIG,
BUCKET_WEBSITE_CONFIG, BucketVersioningSys, ECStore, Error, GetObjectReader, OBJECT_LOCK_CONFIG, ObjectInfo, ObjectOptions,
PolicySys, PutObjReader, Result, StorageError, StorageReplicationConfigExt, StorageVersioningConfigExt, WriteEncryption,
@@ -25,7 +25,7 @@ pub(crate) use crate::storage::storage_compat::{
};
#[cfg(test)]
pub(crate) use crate::storage::storage_compat::{
pub(crate) use super::storage_compat::{
BucketMetadata, DEFAULT_READ_BUFFER_SIZE, bucket_metadata_sys_initialized, get_global_bucket_metadata_sys,
set_bucket_metadata,
};
+2 -2
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
pub(crate) use crate::storage::storage_compat::{
pub(crate) use super::super::storage_compat::{
CollectMetricsOpts, DEFAULT_READ_BUFFER_SIZE, DeleteOptions, DiskError, DiskInfoOptions, DiskStore, FileInfoVersions,
LocalPeerS3Client, MetricType, PEER_RESTSIGNAL, PEER_RESTSUB_SYS, ReadMultipleReq, ReadMultipleResp, ReadOptions, Result,
SERVICE_SIGNAL_REFRESH_CONFIG, SERVICE_SIGNAL_RELOAD_DYNAMIC, StorageDiskRpcExt, StoragePeerS3ClientExt, UpdateMetadataOpts,
@@ -22,4 +22,4 @@ pub(crate) use crate::storage::storage_compat::{
};
#[cfg(test)]
pub(crate) use crate::storage::storage_compat::{Error, STORAGE_CLASS_SUB_SYS};
pub(crate) use super::super::storage_compat::{Error, STORAGE_CLASS_SUB_SYS};