refactor(ecstore): add accessor methods for service globals#3226
Merged
Conversation
Contributor
|
CLA requirements are satisfied for this pull request. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a set of new ECStore accessor methods intended to centralize access to process-global service singletons, as part of the “global singleton consolidation” effort in rustfs-ecstore.
Changes:
- Introduces
ECStoremethods that delegate to existing global getters for notification, bucket metadata, endpoints, region, tier config, server config, and storage class. - Keeps service state process-global (no new state stored on
ECStore), exposing a unified API surface for call sites to migrate toward.
Phase 3 of global singleton consolidation. Add ECStore accessor methods that delegate to process-global service singletons, providing a unified API through ECStore. New methods: - notification_system() — delegates to notification_sys global - bucket_metadata_sys() — delegates to bucket metadata global - endpoints() — delegates to endpoints global - region() — delegates to region global - tier_config_mgr() — delegates to tier config global - server_config() — delegates to server config global - storage_class() — delegates to storage class global 1161 tests pass, clippy clean, formatting clean.
Address review comments: use imported functions instead of crate:: paths to avoid unused import warnings. 1160 tests pass, clippy clean.
e28ea37 to
c82157c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Relates to https://github.com/rustfs/backlog/issues/653 (item 8, Phase 3)
Summary of Changes
Phase 3 of global singleton consolidation. Add ECStore accessor methods that delegate to process-global service singletons, providing a unified API through ECStore for accessing cross-cutting services.
New ECStore methods:
Design:
Verification
cargo test -p rustfs-ecstore --lib cargo clippy -p rustfs-ecstore -- -D warnings cargo fmt --all --checkImpact
No behavioral changes. Pure API addition.
Additional Notes
N/A