diff --git a/crates/ecstore/src/store/list.rs b/crates/ecstore/src/store/list.rs deleted file mode 100644 index 5f7f480b5..000000000 --- a/crates/ecstore/src/store/list.rs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2024 RustFS Team -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -use super::*; - -impl ECStore { - #[instrument(level = "trace", skip(self))] - #[allow(clippy::too_many_arguments)] - pub(super) async fn handle_list_objects_v2( - self: Arc, - bucket: &str, - prefix: &str, - continuation_token: Option, - delimiter: Option, - max_keys: i32, - fetch_owner: bool, - start_after: Option, - incl_deleted: bool, - ) -> Result { - self.inner_list_objects_v2( - bucket, - prefix, - continuation_token, - delimiter, - max_keys, - fetch_owner, - start_after, - incl_deleted, - ) - .await - } - - #[instrument(skip(self))] - pub(super) async fn handle_list_object_versions( - self: Arc, - bucket: &str, - prefix: &str, - marker: Option, - version_marker: Option, - delimiter: Option, - max_keys: i32, - ) -> Result { - self.inner_list_object_versions(bucket, prefix, marker, version_marker, delimiter, max_keys) - .await - } - - pub(crate) async fn list_object_versions_for_lifecycle( - self: Arc, - bucket: &str, - prefix: &str, - marker: Option, - version_marker: Option, - delimiter: Option, - max_keys: i32, - ) -> Result { - self.inner_list_object_versions_for_lifecycle(bucket, prefix, marker, version_marker, delimiter, max_keys) - .await - } - - pub(super) async fn handle_walk( - self: Arc, - rx: CancellationToken, - bucket: &str, - prefix: &str, - result: tokio::sync::mpsc::Sender, - opts: WalkOptions, - ) -> Result<()> { - self.walk_internal(rx, bucket, prefix, result, opts).await - } -} diff --git a/crates/ecstore/src/store/list_objects.rs b/crates/ecstore/src/store/list_objects.rs index df4cb3980..9adadbb13 100644 --- a/crates/ecstore/src/store/list_objects.rs +++ b/crates/ecstore/src/store/list_objects.rs @@ -3844,7 +3844,7 @@ impl ECStore { .await } - pub(crate) async fn inner_list_object_versions_for_lifecycle( + pub(crate) async fn list_object_versions_for_lifecycle( self: Arc, bucket: &str, prefix: &str, diff --git a/crates/ecstore/src/store/mod.rs b/crates/ecstore/src/store/mod.rs index 30a76bb69..f51fa6df5 100644 --- a/crates/ecstore/src/store/mod.rs +++ b/crates/ecstore/src/store/mod.rs @@ -148,7 +148,6 @@ mod heal_walk; pub use heal_walk::HealWalkVersion; mod init; pub(crate) mod init_format; -mod list; pub(crate) mod list_objects; mod multipart; mod object; @@ -601,7 +600,7 @@ impl crate::storage_api_contracts::list::ListOperations for ECStore { start_after: Option, incl_deleted: bool, ) -> Result { - self.handle_list_objects_v2( + self.inner_list_objects_v2( bucket, prefix, continuation_token, @@ -624,7 +623,7 @@ impl crate::storage_api_contracts::list::ListOperations for ECStore { delimiter: Option, max_keys: i32, ) -> Result { - self.handle_list_object_versions(bucket, prefix, marker, version_marker, delimiter, max_keys) + self.inner_list_object_versions(bucket, prefix, marker, version_marker, delimiter, max_keys) .await } @@ -636,7 +635,7 @@ impl crate::storage_api_contracts::list::ListOperations for ECStore { result: tokio::sync::mpsc::Sender, opts: WalkOptions, ) -> Result<()> { - self.handle_walk(rx, bucket, prefix, result, opts).await + self.walk_internal(rx, bucket, prefix, result, opts).await } } diff --git a/scripts/check_logging_guardrails.sh b/scripts/check_logging_guardrails.sh index c9b0a14eb..6db62ecc2 100755 --- a/scripts/check_logging_guardrails.sh +++ b/scripts/check_logging_guardrails.sh @@ -984,7 +984,9 @@ trace_hot_spans=( "crates/ecstore/src/store/object.rs:handle_get_object_info" "crates/ecstore/src/set_disk/ops/object.rs:get_object_info" "crates/ecstore/src/store/mod.rs:list_objects_v2" - "crates/ecstore/src/store/list.rs:handle_list_objects_v2" + # The ECStore handle_list_objects_v2 forwarder was folded into the trait impl + # above, so store/mod.rs now carries this hot path's TRACE requirement + # directly (backlog#1821). # The pool-level Sets::list_objects_v2 wrapper was removed with its duplicate # pagination pipeline (backlog#1821); the remaining ECStore and SetDisks # wrappers below still carry the TRACE requirement.