refactor(ecstore): scope dead code allowances (#4098)

This commit is contained in:
Zhengchao An
2026-06-30 06:07:45 +08:00
committed by GitHub
parent de19342744
commit 055d3ad825
22 changed files with 62 additions and 1 deletions
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: bucket subsystems still contain staged ECStore migration code.
#![allow(dead_code)]
pub mod bandwidth; pub mod bandwidth;
pub mod bucket_target_sys; pub mod bucket_target_sys;
pub mod error; pub mod error;
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: S3 client compatibility models are kept while ECStore callers move to narrower facades.
#![allow(dead_code)]
pub mod admin_handler_utils; pub mod admin_handler_utils;
pub mod api_bucket_policy; pub mod api_bucket_policy;
pub mod api_error_response; pub mod api_error_response;
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: cluster/RPC migration leaves transport capabilities staged for upcoming owners.
#![allow(dead_code)]
mod control_plane; mod control_plane;
pub(crate) mod rpc; pub(crate) mod rpc;
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: configuration migration keeps legacy subsystem definitions available behind this module.
#![allow(dead_code)]
mod audit; mod audit;
pub mod com; pub mod com;
#[allow(dead_code)] #[allow(dead_code)]
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: pool coordination helpers are being migrated behind runtime owners.
#![allow(dead_code)]
pub(crate) mod pools; pub(crate) mod pools;
pub(crate) mod sets; pub(crate) mod sets;
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: data-movement migration keeps staged cleanup helpers until copy paths converge.
#![allow(dead_code)]
pub(crate) mod backpressure; pub(crate) mod backpressure;
use crate::error::{Error, Result, is_err_data_movement_overwrite, is_err_object_not_found, is_err_version_not_found}; use crate::error::{Error, Result, is_err_data_movement_overwrite, is_err_object_not_found, is_err_version_not_found};
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: scanner/data-usage state is partially migrated and still owns staged cache helpers.
#![allow(dead_code)]
pub mod local_snapshot; pub mod local_snapshot;
use crate::storage_api_contracts::{ use crate::storage_api_contracts::{
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: diagnostics constants are staged for request-path telemetry migration.
#![allow(dead_code)]
pub(crate) mod admin_server_info; pub(crate) mod admin_server_info;
pub(crate) mod get; pub(crate) mod get;
pub(crate) mod pool; pub(crate) mod pool;
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: disk abstractions still carry staged health and direct-I/O migration paths.
#![allow(dead_code)]
pub mod disk_store; pub mod disk_store;
pub mod endpoint; pub mod endpoint;
pub mod error; pub mod error;
+3
View File
@@ -12,5 +12,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: erasure codec migration keeps staged streaming decode paths in this module.
#![allow(dead_code)]
pub(crate) mod codec; pub(crate) mod codec;
pub(crate) mod coding; pub(crate) mod coding;
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: error taxonomy still exposes compatibility variants while callers move to contracts.
#![allow(dead_code)]
use crate::bucket::error::BucketMetadataError; use crate::bucket::error::BucketMetadataError;
use crate::disk::error::DiskError; use crate::disk::error::DiskError;
use crate::storage_api_contracts::{error::StorageErrorCode, range::HTTPRangeError}; use crate::storage_api_contracts::{error::StorageErrorCode, range::HTTPRangeError};
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: event target types are retained for notification owner migration.
#![allow(dead_code)]
pub mod name; pub mod name;
pub mod targetid; pub mod targetid;
pub mod targetlist; pub mod targetlist;
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: I/O backend selection keeps test-only and staged rio helpers scoped here.
#![allow(dead_code)]
pub(crate) mod bitrot; pub(crate) mod bitrot;
pub(crate) mod compress; pub(crate) mod compress;
pub(crate) mod rio; pub(crate) mod rio;
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: set-layout contracts are staged while ECStore ownership boundaries shrink.
#![allow(dead_code)]
//! Static ECStore layout boundaries. //! Static ECStore layout boundaries.
//! //!
//! This module owns read-only layout descriptors used to keep static set //! This module owns read-only layout descriptors used to keep static set
-1
View File
@@ -1,4 +1,3 @@
#![allow(dead_code)]
// Copyright 2024 RustFS Team // Copyright 2024 RustFS Team
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: object API readers keep staged compatibility paths during facade migration.
#![allow(dead_code)]
use crate::bucket::metadata_sys::get_versioning_config; use crate::bucket::metadata_sys::get_versioning_config;
use crate::bucket::versioning::VersioningApi as _; use crate::bucket::versioning::VersioningApi as _;
use crate::config::storageclass; use crate::config::storageclass;
+3
View File
@@ -12,5 +12,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: runtime source migration keeps fallback handles until all owners inject state.
#![allow(dead_code)]
pub(crate) mod global; pub(crate) mod global;
pub(crate) mod sources; pub(crate) mod sources;
+3
View File
@@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: background service owners still contain staged notification/rebalance/tier paths.
#![allow(dead_code)]
pub(crate) mod batch_processor; pub(crate) mod batch_processor;
pub(crate) mod event_notification; pub(crate) mod event_notification;
pub(crate) mod metrics_realtime; pub(crate) mod metrics_realtime;
+2
View File
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: SetDisks still hosts staged read/heal/write migration helpers.
#![allow(dead_code)]
#![allow(unused_imports)] #![allow(unused_imports)]
#![allow(unused_variables)] #![allow(unused_variables)]
@@ -1,3 +1,6 @@
// #730: storage contract traits are staged for facade migration and external owners.
#![allow(dead_code)]
use crate::error::Error; use crate::error::Error;
use crate::object_api::{GetObjectReader, ObjectInfo, ObjectOptions, PutObjReader}; use crate::object_api::{GetObjectReader, ObjectInfo, ObjectOptions, PutObjReader};
use rustfs_filemeta::FileInfo; use rustfs_filemeta::FileInfo;
+2
View File
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// #730: store startup/listing helpers are staged while global state is moved to owners.
#![allow(dead_code)]
#![allow(clippy::map_entry)] #![allow(clippy::map_entry)]
use crate::bucket::lifecycle::bucket_lifecycle_audit::LcEventSrc; use crate::bucket::lifecycle::bucket_lifecycle_audit::LcEventSrc;
@@ -41,6 +41,10 @@ require_source_contains() {
fi fi
} }
if grep -Eq '^[[:space:]]*#!\[allow\([^]]*dead_code' "${ROOT_DIR}/crates/ecstore/src/lib.rs"; then
report_failure "ecstore crate root must not use allow(dead_code); scope temporary allowances to owning modules"
fi
require_source_contains "docs/architecture/overview.md" "## Baseline" "architecture overview baseline section" require_source_contains "docs/architecture/overview.md" "## Baseline" "architecture overview baseline section"
require_source_contains "docs/architecture/overview.md" "## Core Principle" "architecture overview core principle section" require_source_contains "docs/architecture/overview.md" "## Core Principle" "architecture overview core principle section"
require_source_contains "docs/architecture/overview.md" "## Phase Order" "architecture overview phase order section" require_source_contains "docs/architecture/overview.md" "## Phase Order" "architecture overview phase order section"