mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 08:18:18 +00:00
refactor: move ecstore store init support (#3931)
This commit is contained in:
@@ -48,6 +48,7 @@ mod set_disk;
|
||||
mod sets;
|
||||
mod storage_api_contracts;
|
||||
mod store;
|
||||
#[path = "store/init_format.rs"]
|
||||
mod store_init;
|
||||
#[path = "store/list_objects.rs"]
|
||||
mod store_list_objects;
|
||||
|
||||
@@ -5,21 +5,20 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
|
||||
## Current Context
|
||||
|
||||
- Issue: [`rustfs/backlog#660`](https://github.com/rustfs/backlog/issues/660)
|
||||
- Branch: `overtrue/arch-ecstore-store-support-layout`
|
||||
- Branch: `overtrue/arch-ecstore-store-init-layout`
|
||||
- Baseline: completed `C-011/C-012/C-013/API-055/API-059/API-079/API-080/API-081/API-082/API-083/API-084/API-085/API-086/API-087/API-088/API-089/API-090/API-091/API-092/API-093/API-094/API-095/API-096/API-097/API-098/API-099/API-100/API-101/API-102/API-103/API-104/API-105/API-106/API-107/API-108/API-109/API-110/API-111/API-112/API-113/API-114/API-115/API-116/API-117/API-118/API-119/API-120/API-121/API-122/API-123/API-124/API-125/API-126/API-127/API-128/API-129/API-130/API-131/API-132/API-133/API-134/API-135/API-136/API-137/API-138/API-139/API-140/API-141/API-142/API-143/API-144/API-145/API-146/API-147/API-148/API-149/API-150/API-151/API-152/API-153/API-154/API-155/API-156/API-157/API-158/API-159/API-160/API-161/API-162/API-163/API-164/API-165/API-166/API-167/API-168/API-169/API-170/API-171/API-172/API-173/API-174/API-175/API-176/API-177/API-178/API-179/API-180/API-181/API-182/API-183/API-184/API-185/API-186/API-187/API-188/API-189/API-190/API-191/API-192/API-193/API-194/API-195/API-196/API-197/API-198/API-199/API-200/API-201/API-202/API-203/API-204/API-205/API-206/API-207/API-208/API-209/API-210/API-211/API-212/API-213/API-214/API-215/API-216/API-217/API-218/API-219/API-220/API-221/API-222/API-223/API-224/API-225/API-226/API-227/API-228/API-229/API-230/API-231/API-232/API-233/API-234/API-235/API-236/API-237/API-238/API-239/API-240/API-241/API-242/API-243/API-244/API-245/API-246/API-247/API-248/API-249/API-250/API-251/API-252/API-253/API-254/CTX-002`.
|
||||
- Current baseline also includes API-255 from PR #3923, API-256 from PR
|
||||
#3925, and CFG-009 from PR #3927.
|
||||
- Current phase PR: E-018/E-STORE-002 ECStore store support module owner layout.
|
||||
- Based on: E-017 branch while PR #3929 is pending; rebase onto `origin/main`
|
||||
after E-017 merges before opening this PR.
|
||||
- Current phase PR: E-019/E-STORE-003 ECStore store init support module owner layout.
|
||||
- Based on: E-018 branch while PR #3929 is pending; rebase onto `origin/main`
|
||||
after E-017 and E-018 merge before opening this PR.
|
||||
- PR type for this branch: `pure-move`
|
||||
- Runtime behavior changes: none expected for E-018; this is a pure module file
|
||||
move that keeps the existing `store_list_objects` and `store_utils` module
|
||||
paths.
|
||||
- Rust code changes: move ECStore store support modules into the `store/`
|
||||
- Runtime behavior changes: none expected for E-019; this is a pure module file
|
||||
move that keeps the existing `store_init` module path.
|
||||
- Rust code changes: move ECStore store init support module into the `store/`
|
||||
owner directory without function-body changes.
|
||||
- CI/script changes: reject restoring ECStore root `store.rs`, `set_disk.rs`,
|
||||
`store_list_objects.rs`, or `store_utils.rs`;
|
||||
`store_list_objects.rs`, `store_utils.rs`, or `store_init.rs`;
|
||||
lock completed config model ownership against restoring
|
||||
old `rustfs_ecstore::config` model/accessor compatibility paths, and lock
|
||||
ECStore public facades against re-exporting the moved server-config symbols;
|
||||
@@ -54,8 +53,9 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
|
||||
`rustfs_ecstore::api` facade imports outside local `storage_api` boundary
|
||||
files after API-256, and reject restoring old ECStore server-config model or
|
||||
global accessor compatibility paths after CFG-009, reject restoring ECStore
|
||||
root `store.rs` or `set_disk.rs` after E-017, and reject restoring ECStore
|
||||
root store support modules after E-018.
|
||||
root `store.rs` or `set_disk.rs` after E-017, reject restoring ECStore root
|
||||
store support modules after E-018, and reject restoring ECStore root
|
||||
`store_init.rs` after E-019.
|
||||
|
||||
## Phase 0 Tasks
|
||||
|
||||
@@ -3919,6 +3919,19 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
|
||||
formatting, diff hygiene, Rust risk scan, branch freshness check,
|
||||
pre-commit quality gate, and three-expert review.
|
||||
|
||||
- [x] `E-019/E-STORE-003` Move ECStore store init support module under the store owner.
|
||||
- Do: move `crates/ecstore/src/store_init.rs` to
|
||||
`crates/ecstore/src/store/init_format.rs` while preserving the existing
|
||||
crate module name through a path declaration.
|
||||
- Acceptance: `crate::store_init` continues to resolve through the same
|
||||
module name, and migration rules reject restoring the old root file.
|
||||
- Must preserve: disk initialization, format quorum loading, MinIO format
|
||||
migration, format write/read helpers, store initialization call sites,
|
||||
set-disk format helpers, and all runtime side effects.
|
||||
- Verification: focused ECStore compile/tests, migration and layer guards,
|
||||
formatting, diff hygiene, Rust risk scan, branch freshness check,
|
||||
pre-commit quality gate, and three-expert review.
|
||||
|
||||
- [x] `API-129` Route RustFS internal ECStore consumers through owner boundary.
|
||||
- Do: expose crate-local ECStore facade module aliases from
|
||||
`rustfs/src/storage/mod.rs` and migrate RustFS startup, server, capacity,
|
||||
@@ -5773,6 +5786,9 @@ Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` block
|
||||
|
||||
| Expert | Status | Notes |
|
||||
|---|---|---|
|
||||
| Quality/architecture | pass | E-019 moves ECStore store init format support under the store owner directory and extends the existing root support guard. |
|
||||
| Migration preservation | pass | `crate::store_init` stays stable through a path declaration, and the moved file is a 100% rename with no function-body changes. |
|
||||
| Testing/verification | pass | ECStore tests, architecture/layer guards, formatting, diff hygiene, diff-added Rust risk scan, and pre-commit passed. |
|
||||
| Quality/architecture | pass | E-018 moves ECStore store list/object utility support modules under the store owner directory and guards against restoring the old root files. |
|
||||
| Migration preservation | pass | `crate::store_list_objects` and `crate::store_utils` module names stay stable through path declarations, while both moved files are 100% renames. |
|
||||
| Testing/verification | pass | ECStore compile/tests, architecture/layer guards, formatting, diff hygiene, diff-added Rust risk scan, and pre-commit passed. |
|
||||
|
||||
@@ -2796,6 +2796,7 @@ fi
|
||||
{
|
||||
[[ -e crates/ecstore/src/store_list_objects.rs ]] && printf '%s\n' 'crates/ecstore/src/store_list_objects.rs'
|
||||
[[ -e crates/ecstore/src/store_utils.rs ]] && printf '%s\n' 'crates/ecstore/src/store_utils.rs'
|
||||
[[ -e crates/ecstore/src/store_init.rs ]] && printf '%s\n' 'crates/ecstore/src/store_init.rs'
|
||||
true
|
||||
}
|
||||
) >"$ECSTORE_ROOT_STORE_SUPPORT_MODULE_HITS_FILE"
|
||||
|
||||
Reference in New Issue
Block a user