mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-27 16:48:58 +00:00
chore(docs): refresh agent docs, guard doc paths, archive plans (#4203)
Agent-instruction and architecture docs had drifted from the code: - CLAUDE.md: slim to commands + pointers; fix wrong claim that `make pre-commit` is the full pre-PR gate (that is `make pre-pr`); drop stale pre-#3929 file paths and merged bug narratives - AGENTS.md: drop dead `rust-refactor-helper` skill rule and the hand-maintained (already stale) scoped-AGENTS index; link architecture docs from Sources of Truth - .github/AGENTS.md: replace the outdated copied CI command matrix with a pointer to ci.yml - crates/AGENTS.md: merge duplicated Testing sections - ARCHITECTURE.md: resolve the utils->config contradiction (edges are removed), mark volatile counts as snapshots, fix a bad path - docs/architecture: add README router; move one-shot plans/trackers (rebalance-decommission phases, migration-progress ledger, PR template) to docs/superpowers/plans with archive headers; fix stale source paths in kept inventories (core/sets.rs, core/pools.rs, store/mod.rs, startup_* split from #3671) - docs/operations/tier-ilm-debugging.md: extracted tier debugging playbook with corrected paths - scripts/check_doc_paths.sh: new guard failing pre-commit/pre-pr when instruction/architecture docs reference nonexistent file paths - .claude/skills: add tier-debug and arch-checks repo skills; .gitignore now keeps .claude/skills and docs/operations committable Verification: ./scripts/check_doc_paths.sh, ./scripts/check_architecture_migration_rules.sh (both pass) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
# Architecture Documentation
|
||||
|
||||
Durable architecture reference for RustFS: migration guardrails, runtime
|
||||
contracts, boundary rules, and support matrices.
|
||||
|
||||
Two rules keep this directory healthy:
|
||||
|
||||
1. **Durable reference only.** One-shot implementation plans, task trackers,
|
||||
and PR templates live in [`docs/superpowers/plans/`](../superpowers/plans/)
|
||||
and are archived there when their work closes.
|
||||
2. **No copies of other sources of truth.** Crate lists come from
|
||||
`Cargo.toml`, CI steps from `.github/workflows/ci.yml`, code structure from
|
||||
the code. `scripts/check_doc_paths.sh` fails the pre-commit gate when a
|
||||
doc here references a file path that no longer exists.
|
||||
|
||||
## Start here
|
||||
|
||||
- [overview.md](overview.md) — migration baseline, phase order, core principles
|
||||
|
||||
## CI-enforced core (required by `scripts/check_architecture_migration_rules.sh`)
|
||||
|
||||
- [crate-boundaries.md](crate-boundaries.md) — dependency direction, PR types, re-export contracts
|
||||
- [runtime-lifecycle.md](runtime-lifecycle.md) — startup/shutdown sequencing, readiness guarantees
|
||||
- [readiness-matrix.md](readiness-matrix.md) — request/dependency behavior, probe semantics
|
||||
- [storage-control-data-plane.md](storage-control-data-plane.md) — storage API contracts, control-plane boundaries
|
||||
- [global-state-crate-split-plan.md](global-state-crate-split-plan.md) — remaining global-state owners and split evaluation
|
||||
- [ecstore-module-split-plan.md](ecstore-module-split-plan.md) — ECStore decomposition rules and facade contracts
|
||||
|
||||
## Contracts & invariants
|
||||
|
||||
- [placement-repair-invariants.md](placement-repair-invariants.md)
|
||||
- [runtime-capability-contracts.md](runtime-capability-contracts.md)
|
||||
- [workload-admission-contracts.md](workload-admission-contracts.md)
|
||||
- [background-controller-contract.md](background-controller-contract.md)
|
||||
- [config-model-boundary-adr.md](config-model-boundary-adr.md)
|
||||
- [ecstore-layout-boundary.md](ecstore-layout-boundary.md)
|
||||
- [decommission-compatibility.md](decommission-compatibility.md)
|
||||
|
||||
## Support matrices (release-facing, keep current)
|
||||
|
||||
- [s3-compatibility-matrix.md](s3-compatibility-matrix.md)
|
||||
- [s3-tables-support-matrix.md](s3-tables-support-matrix.md)
|
||||
|
||||
## Inventories & baselines (snapshots that feed migration work)
|
||||
|
||||
- [global-state-inventory.md](global-state-inventory.md)
|
||||
- [ecstore-api-facade-inventory.md](ecstore-api-facade-inventory.md)
|
||||
- [ecstore-config-consumer-inventory.md](ecstore-config-consumer-inventory.md)
|
||||
- [obs-ecstore-dependency-inventory.md](obs-ecstore-dependency-inventory.md)
|
||||
- [background-services-inventory.md](background-services-inventory.md)
|
||||
- [admin-route-action-snapshot.md](admin-route-action-snapshot.md)
|
||||
- [startup-timeline.md](startup-timeline.md)
|
||||
- [scheduler-baseline.md](scheduler-baseline.md)
|
||||
- [profiling-numa-capability-inventory.md](profiling-numa-capability-inventory.md)
|
||||
- [kms-development-defaults-inventory.md](kms-development-defaults-inventory.md)
|
||||
- [compat-cleanup-register.md](compat-cleanup-register.md)
|
||||
|
||||
Historical plans and trackers (rebalance/decommission phases,
|
||||
migration-progress ledger) were moved to
|
||||
[`docs/superpowers/plans/`](../superpowers/plans/) in 2026-07.
|
||||
@@ -36,7 +36,7 @@ not define a new scheduler, controller framework, or shutdown contract.
|
||||
| Service | Trigger and workers | Side effects | Status and metrics | Migration notes |
|
||||
|---|---|---|---|---|
|
||||
| Capacity background refresh | `rustfs/src/capacity/capacity_integration.rs::init_capacity_management` delegates to `init_capacity_management_for_local_disks`, then `crates/object-capacity/src/capacity_manager.rs::start_background_task` spawns a scheduled refresh loop and a runtime summary loop. | Refreshes global capacity cache from local disks and logs runtime summaries. | Uses the object-capacity manager state and log summaries; no explicit shutdown status surface is exposed here. | Add read-only status before any controller migration. A future controller must not change scheduled interval defaults or singleflight refresh behavior. |
|
||||
| ECStore endpoint monitor | `crates/ecstore/src/sets.rs::new` spawns `monitor_and_connect_endpoints`. | Monitors endpoint connectivity and reconnect behavior for erasure sets. | Logs monitor start, cancellation, and exit. | This is storage-adjacent and must stay outside broad controller movement until storage shutdown semantics are explicitly covered. |
|
||||
| ECStore endpoint monitor | `crates/ecstore/src/core/sets.rs::new` spawns `monitor_and_connect_endpoints`. | Monitors endpoint connectivity and reconnect behavior for erasure sets. | Logs monitor start, cancellation, and exit. | This is storage-adjacent and must stay outside broad controller movement until storage shutdown semantics are explicitly covered. |
|
||||
| Local disk health monitor | `crates/ecstore/src/store/init.rs::init` enables disk health checks after store initialization; `crates/ecstore/src/disk/disk_store.rs::enable_health_check` spawns writable and recovery monitors. | Periodically probes disk writability, can create test objects named `health-check-*`, and updates disk runtime health state. | Disk info includes runtime health metrics and waiting counts. | Do not merge this with scanner/heal controller work; probes affect disk health semantics. |
|
||||
| Data scanner | `crates/scanner/src/scanner.rs::init_data_scanner` configures scanner defaults, applies runtime config, waits the initial scanner delay, then loops `run_data_scanner`. | Updates data usage cache, scans buckets/sets, evaluates lifecycle rules, queues replication heal, queues scanner heal, and emits scanner alerts. | Scanner runtime config/status is exposed through admin scanner status; scanner metrics record ILM, replication admission, heal admission, checkpoints, yields, and alerts. | Scanner implies heal because scanner can enqueue heal requests. Future controller status must separate scheduler state from scanner work-source accounting. |
|
||||
| Heal/AHM | `crates/heal/src/lib.rs::init_heal_manager` starts `HealManager`, initializes the shared heal channel, and spawns `HealChannelProcessor`. | Consumes heal requests from the global heal channel and drives heal work through the configured heal storage API. | Global active-task and queue-length atomics track current heal pressure. | Keep heal admission and channel semantics intact. Controller work should first expose queue/active status and shutdown state. |
|
||||
|
||||
@@ -167,5 +167,5 @@ The queued multi-pool contract is guarded by:
|
||||
- `test_first_resumable_decommission_queue_indices_allows_after_completed_prefix`
|
||||
- `admin_pool_list_item_exposes_queued_decommission_state`
|
||||
|
||||
These tests live in `crates/ecstore/src/pools.rs` and
|
||||
These tests live in `crates/ecstore/src/core/pools.rs` and
|
||||
`rustfs/src/app/admin_usecase.rs`.
|
||||
|
||||
@@ -42,7 +42,7 @@ or calls the right node.
|
||||
```mermaid
|
||||
flowchart TB
|
||||
EC["crates/ecstore/src/config"]
|
||||
Store["crates/ecstore/src/store.rs"]
|
||||
Store["crates/ecstore/src/store/mod.rs"]
|
||||
AppCtx["rustfs/src/app/context.rs"]
|
||||
Server["rustfs/src/server/{event,audit}.rs"]
|
||||
Admin["rustfs/src/admin"]
|
||||
@@ -93,7 +93,7 @@ behind narrower contracts.
|
||||
| `crates/ecstore/src/config/mod.rs` | Defines `KV`, `KVS`, `Config`, defaults, global snapshot, initialization, and tests. |
|
||||
| `crates/ecstore/src/config/com.rs` | Encodes, decodes, reads, writes, creates, and normalizes server config objects through ECStore-local persistence helpers. |
|
||||
| `crates/ecstore/src/config/{notify,audit,oidc,scanner,storageclass}.rs` | Register default `KVS` values and subsystem-specific parsing helpers. |
|
||||
| `crates/ecstore/src/store.rs` | Exposes store-level server-config accessors that delegate to the global config snapshot. |
|
||||
| `crates/ecstore/src/store/mod.rs` | Exposes store-level server-config accessors that delegate to the global config snapshot. |
|
||||
|
||||
### App Context And Server Startup Consumers
|
||||
|
||||
|
||||
@@ -50,8 +50,8 @@ hot-path behavior must not drift during this migration.
|
||||
- [`config-model-boundary-adr.md`](config-model-boundary-adr.md): target crate,
|
||||
module path, dependency rules, and verification gates for moving the pure
|
||||
server-config model.
|
||||
- [`migration-progress.md`](migration-progress.md): current task state and context
|
||||
handoff.
|
||||
- [`migration-progress.md`](../superpowers/plans/migration-progress.md): historical
|
||||
task ledger for the closed migration (execution tracking moved to issue #665).
|
||||
- [`compat-cleanup-register.md`](compat-cleanup-register.md): temporary
|
||||
compatibility code that must be removed later.
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ new startup semantics.
|
||||
| `BOOT-003` | `rustfs/src/startup_entrypoint.rs` | Parse CLI command and dispatch non-server commands. | `info` and `tls` commands execute and return without server startup. | Command parse exits process with code 1; TLS command errors propagate. | None |
|
||||
| `BOOT-004` | `rustfs/src/startup_preflight.rs` | Initialize config snapshot and license state. | Publishes config snapshot for later readers and initializes runtime license state. | License init is non-fallible in this path. | None |
|
||||
| `BOOT-005` | `rustfs/src/startup_preflight.rs` | Initialize observability and store the global guard. | Initializes tracing/observability, stores the guard globally, and logs license/runtime telemetry status. | Fatal if observability init or guard publication fails. | None |
|
||||
| `BOOT-006` | `rustfs/src/startup_runtime.rs`, `rustfs/src/startup_runtime_hooks.rs`, `rustfs/src/startup_tls_material.rs`, and `rustfs/src/startup_profiling.rs` | Log startup logo, initialize profiling, trusted proxies, rustls provider, and outbound TLS material. | Starts optional profiling tasks, trusted proxy config, default rustls provider, outbound TLS global state, TLS generation metric, and TLS metrics when enabled. | Profiling/proxy/provider setup is non-fatal; configured TLS material load is fatal on error. | None |
|
||||
| `BOOT-006` | `rustfs/src/startup_runtime.rs`, `rustfs/src/startup_runtime_hooks.rs`, `rustfs/src/startup_tls_material.rs` | Log startup logo, initialize profiling, trusted proxies, rustls provider, and outbound TLS material. | Starts optional profiling tasks, trusted proxy config, default rustls provider, outbound TLS global state, TLS generation metric, and TLS metrics when enabled. | Profiling/proxy/provider setup is non-fatal; configured TLS material load is fatal on error. | None |
|
||||
| `RUN-001` | `rustfs/src/startup_server.rs` | Enter startup run orchestration and create `GlobalReadiness`. | Allocates the readiness tracker shared with HTTP readiness gates. | Non-fatal. | Initial readiness state is not ready |
|
||||
| `RUN-002` | `rustfs/src/startup_server.rs` | Parse and publish the configured region. | Updates ECStore global region when configured. | Fatal if the configured region is invalid. | None |
|
||||
| `RUN-003` | `rustfs/src/startup_server.rs` | Resolve server address and warn on default credentials. | Computes server port/address and emits production credential warning when defaults are used. | Address parse is fatal; default credentials warning is non-fatal. | None |
|
||||
@@ -38,13 +38,13 @@ new startup semantics.
|
||||
| `RUN-012` | `rustfs/src/startup_storage.rs` | Initialize ECStore config and global config system. | Initializes ECStore config, attempts server-config migration, then retries global config init up to 15 times. | Migration attempt is non-fatal in this path; global config init becomes fatal after retries. | Marks the `GlobalReadiness` `StorageReady` stage after global config init succeeds; later runtime readiness still rechecks storage, IAM, lock quorum, and gated peer health before `FullReady` |
|
||||
| `RUN-013` | `rustfs/src/startup_storage.rs` and `rustfs/src/startup_services.rs` | Start replication and KMS systems. | Starts background replication pool, then initializes KMS from startup services. | Replication init is non-fatal in this path; KMS init is fatal on error. | `StorageReady` stage is already marked; dynamic runtime storage readiness is still checked before `FullReady`; KMS compatibility readiness remains feature-gated health behavior |
|
||||
| `RUN-014` | `rustfs/src/startup_optional_runtime_sidecars.rs` and `rustfs/src/startup_protocols.rs` | Initialize optional protocol servers. | Starts FTP/FTPS/WebDAV/SFTP when feature-enabled and configured, collecting shutdown handles. | Feature-enabled protocol init is fatal on error; disabled protocols are non-fatal. | None |
|
||||
| `RUN-015` | `rustfs/src/startup_services.rs` and `rustfs/src/startup_service_components.rs` | Initialize buffer profiling, event notifier, audit, and deadlock detector. | Starts buffer profile system, event notifier, audit system, and optional deadlock detector. | Audit startup failure is logged and non-fatal; the others are non-fatal in this path. | None |
|
||||
| `RUN-016` | `rustfs/src/startup_service_components.rs` | List buckets and run bucket/replication/IAM metadata migrations. | Reads bucket names, migrates bucket metadata, initializes replication resync, migrates IAM config, and initializes bucket metadata system. | Bucket list and replication resync are fatal on error; metadata migration calls are non-fatal in this path. | Storage remains ready; IAM not yet ready |
|
||||
| `RUN-017` | `rustfs/src/startup_service_components.rs` and `rustfs/src/startup_iam.rs` | Bootstrap IAM inline or defer recovery. | Initializes IAM when possible; otherwise starts the deferred IAM recovery path through `startup_iam`. | Fatal only when `bootstrap_or_defer_iam_init` returns an unrecoverable error. | Inline success marks `IamReady`; deferred mode publishes `IamReady` later from the recovery task |
|
||||
| `RUN-018` | `rustfs/src/startup_service_components.rs` | Initialize Keystone and OIDC auth integrations. | Loads Keystone env config and initializes OIDC providers. | Keystone config parse is fatal; Keystone runtime init failure is non-fatal; OIDC init failure is non-fatal. | None |
|
||||
| `RUN-019` | `rustfs/src/startup_service_components.rs` | Add bucket notification config and initialize notification system. | Adds bucket notification configuration and publishes the global notification system. | Notification config add is non-fatal in this path; global notification init is fatal on error. | None |
|
||||
| `RUN-020` | `rustfs/src/startup_service_components.rs` | Create AHM cancellation token and initialize heal manager when scanner or heal is enabled. | Creates AHM cancellation token and starts heal manager for heal/scanner workflows. | Heal manager init is fatal when enabled. | None |
|
||||
| `RUN-021` | `rustfs/src/startup_service_components.rs` | Print server info, init update check, allocator reclaim, metrics, memory observability, and auto-tuner. | Starts informational/update/memory/metrics background tasks when enabled. | Non-fatal in this path. | None |
|
||||
| `RUN-015` | `rustfs/src/startup_services.rs`, `rustfs/src/startup_audit.rs`, and `rustfs/src/startup_deadlock.rs` | Initialize buffer profiling, event notifier, audit, and deadlock detector. | Starts buffer profile system, event notifier, audit system, and optional deadlock detector. | Audit startup failure is logged and non-fatal; the others are non-fatal in this path. | None |
|
||||
| `RUN-016` | `rustfs/src/startup_bucket_metadata.rs` | List buckets and run bucket/replication/IAM metadata migrations. | Reads bucket names, migrates bucket metadata, initializes replication resync, migrates IAM config, and initializes bucket metadata system. | Bucket list and replication resync are fatal on error; metadata migration calls are non-fatal in this path. | Storage remains ready; IAM not yet ready |
|
||||
| `RUN-017` | `rustfs/src/startup_iam.rs` | Bootstrap IAM inline or defer recovery. | Initializes IAM when possible; otherwise starts the deferred IAM recovery path through `startup_iam`. | Fatal only when `bootstrap_or_defer_iam_init` returns an unrecoverable error. | Inline success marks `IamReady`; deferred mode publishes `IamReady` later from the recovery task |
|
||||
| `RUN-018` | `rustfs/src/startup_auth.rs` | Initialize Keystone and OIDC auth integrations. | Loads Keystone env config and initializes OIDC providers. | Keystone config parse is fatal; Keystone runtime init failure is non-fatal; OIDC init failure is non-fatal. | None |
|
||||
| `RUN-019` | `rustfs/src/startup_notification.rs` | Add bucket notification config and initialize notification system. | Adds bucket notification configuration and publishes the global notification system. | Notification config add is non-fatal in this path; global notification init is fatal on error. | None |
|
||||
| `RUN-020` | `rustfs/src/startup_background.rs` | Create AHM cancellation token and initialize heal manager when scanner or heal is enabled. | Creates AHM cancellation token and starts heal manager for heal/scanner workflows. | Heal manager init is fatal when enabled. | None |
|
||||
| `RUN-021` | `rustfs/src/startup_observability.rs` | Print server info, init update check, allocator reclaim, metrics, memory observability, and auto-tuner. | Starts informational/update/memory/metrics background tasks when enabled. | Non-fatal in this path. | None |
|
||||
| `RUN-022` | `rustfs/src/startup_lifecycle.rs` and `rustfs/src/startup_iam.rs` | Log successful startup and publish full readiness for inline IAM. | Logs version/address, checks runtime readiness, marks `FullReady`, and sets service state to `Ready` when IAM was ready inline. | Fatal if runtime readiness is not reached within the startup wait. | Marks `FullReady` only for inline IAM here |
|
||||
| `RUN-023` | `rustfs/src/startup_lifecycle.rs` | Publish global init time and start data scanner when enabled. | Sets global init time and starts scanner after the successful-startup log. | Scanner start is non-fatal in this path. | Full readiness may already be published or may await deferred IAM recovery |
|
||||
| `RUN-024` | `rustfs/src/startup_lifecycle.rs` | Wait for shutdown signal. | Blocks the main task until a shutdown signal is received. | Non-fatal. | Runtime remains in its current readiness state |
|
||||
@@ -72,7 +72,7 @@ new startup semantics.
|
||||
| `STOP-001` | `rustfs/src/startup_shutdown.rs` | Cancel runtime token and move service state to `Stopping`. | Notifies cancellation-aware background tasks. | Non-fatal. | Service state moves to `Stopping`; readiness stages are not cleared here |
|
||||
| `STOP-002` | `rustfs/src/startup_shutdown.rs` | Stop scanner/background services and AHM services according to enable flags. | Calls ECStore background shutdown and heal/scanner shutdown helpers. | Non-fatal in this path. | No readiness-stage change |
|
||||
| `STOP-003` | `rustfs/src/startup_optional_runtime_sidecars.rs` | Plan optional runtime shutdown and log stopping state for FTP/FTPS/WebDAV/SFTP protocol servers. | Collects protocol shutdown handles. | Non-fatal in this path. | No readiness-stage change |
|
||||
| `STOP-004` | `rustfs/src/startup_shutdown.rs`, `rustfs/src/startup_runtime_hooks.rs`, and `rustfs/src/startup_profiling.rs` | Stop event notifier, audit system, and profiling tasks. | Stops notifier and profiling tasks; audit stop failures are logged. | Non-fatal in this path. | No readiness-stage change |
|
||||
| `STOP-004` | `rustfs/src/startup_shutdown.rs`, `rustfs/src/startup_runtime_hooks.rs` | Stop event notifier, audit system, and profiling tasks. | Stops notifier and profiling tasks; audit stop failures are logged. | Non-fatal in this path. | No readiness-stage change |
|
||||
| `STOP-005` | `rustfs/src/startup_shutdown.rs` and `rustfs/src/startup_optional_runtime_sidecars.rs` | Stop S3 and console HTTP servers, signal and wait for optional protocol shutdowns, then mark service state `Stopped`. | HTTP shutdown happens after notifier/audit/profiling shutdown in current order. | Join failures are logged by shutdown handles; this path does not return errors. | Service state moves to `Stopped`; readiness stages are not cleared here |
|
||||
|
||||
## Migration Rules
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
# Tier / ILM Transition Debugging Guide
|
||||
|
||||
How to debug lifecycle tiering (hot → cold transition) issues: inspecting
|
||||
`xl.meta`, tracing the versionId sent to the remote tier, and known pitfalls.
|
||||
|
||||
> Code map (post `#3929` layout):
|
||||
>
|
||||
> | Concern | Location |
|
||||
> |---------|----------|
|
||||
> | ILM actions (`transition_object`, `expire_transitioned_object`, `get_transitioned_object_reader`, `gen_transition_objname`) | `crates/ecstore/src/bucket/lifecycle/bucket_lifecycle_ops.rs` |
|
||||
> | Erasure-set transition/restore entry points | `crates/ecstore/src/set_disk/` and `crates/ecstore/src/store/` |
|
||||
> | `WarmBackend` trait (put/get/remove/in_use) | `crates/ecstore/src/services/tier/warm_backend.rs` |
|
||||
> | Per-provider tier backends (S3, MinIO, GCS, Azure, …) | `crates/ecstore/src/services/tier/warm_backend_*.rs` |
|
||||
> | Remote-tier sweep (`delete_object_from_remote_tier`) | `crates/ecstore/src/bucket/lifecycle/tier_sweeper.rs` |
|
||||
> | `ObjectInfo` / `TransitionedObject` types | `crates/ecstore/src/object_api/types.rs` |
|
||||
> | `FileMeta` / `FileInfo` / version metadata | `crates/filemeta/src/` |
|
||||
> | Dual-key internal metadata helpers (`insert_bytes` / `get_bytes`) | `crates/utils/src/http/metadata_compat.rs` |
|
||||
|
||||
## Metadata key conventions
|
||||
|
||||
Internal metadata is stored under **both** `x-rustfs-internal-<suffix>` and
|
||||
`x-minio-internal-<suffix>` for MinIO interoperability. `get_bytes` prefers
|
||||
the RustFS key and falls back to the MinIO key.
|
||||
|
||||
| Suffix | Meaning |
|
||||
|--------|---------|
|
||||
| `transition-status` | `"complete"` when tiered |
|
||||
| `transitioned-object` | tier key path (stored **without** the tier prefix; `get_dest` adds it) |
|
||||
| `transitioned-versionID` | S3 version_id returned by tier PUT (16 raw UUID bytes, or absent) |
|
||||
| `transition-tier` | tier name |
|
||||
| `tier-free-versionID` | delete-marker version for free-version sweep |
|
||||
|
||||
Reading binary values must reject empty/malformed/nil values (regression
|
||||
covered in `crates/filemeta/src/filemeta/version.rs` tests):
|
||||
|
||||
```rust
|
||||
get_bytes(&self.meta_sys, SUFFIX_TRANSITIONED_VERSION_ID)
|
||||
.and_then(|v| Uuid::from_slice(v.as_slice()).ok())
|
||||
.filter(|u| !u.is_nil())
|
||||
// None for: absent key, wrong-length bytes, nil UUID
|
||||
```
|
||||
|
||||
`transition_version_id == None` means the tier bucket is unversioned; the
|
||||
GET/DELETE against the tier must then send **no** `versionId` parameter.
|
||||
A nil UUID (`00000000-…`) sent as `?versionId=` causes `NoSuchVersion`.
|
||||
|
||||
## Inspect xl.meta directly
|
||||
|
||||
```bash
|
||||
cargo build -p rustfs-filemeta --example dump_fileinfo
|
||||
./target/debug/examples/dump_fileinfo /srv/rustfs/data/disk0/{bucket}/{object}/xl.meta
|
||||
# Shows: transition_status, transition_tier, transitioned_obj, transition_ver_id
|
||||
```
|
||||
|
||||
- `transition_ver_id: <none>` → no versionId will be sent to the tier
|
||||
(correct for a non-versioned tier bucket).
|
||||
- `transition_ver_id: <uuid>` → that UUID will be sent as `?versionId=<uuid>`.
|
||||
|
||||
There is one `xl.meta` per erasure shard disk
|
||||
(`{disk}/{bucket}/{object}/xl.meta`); all shards of a healthy object should
|
||||
be identical. `dump_versions` (same crate) lists every version in a file.
|
||||
|
||||
## Trace the versionId at runtime
|
||||
|
||||
```bash
|
||||
RUST_LOG=rustfs_ecstore::bucket::lifecycle=debug rustfs …
|
||||
```
|
||||
|
||||
- `fetching transitioned object from tier` — DEBUG, before the tier request.
|
||||
- `tier GET failed` — ERROR, includes `tier_version_id`.
|
||||
|
||||
If both `x-rustfs-internal-transitioned-versionID` and
|
||||
`x-minio-internal-transitioned-versionID` are the **empty string**, the object
|
||||
was transitioned to a non-versioned tier bucket and no versionId must be sent.
|
||||
|
||||
## Known open issue: expire/GET race
|
||||
|
||||
`expire_transitioned_object` deletes the remote tier version **before**
|
||||
deleting local metadata. A concurrent GET between those two steps reads a
|
||||
valid stored version_id whose remote version is already gone →
|
||||
`NoSuchVersion`. The proper fix is to delete local metadata first (making the
|
||||
object unreachable), then the remote tier version.
|
||||
|
||||
## Historical fixes (for context, already merged)
|
||||
|
||||
- Nil-UUID versionId sent to tier (`NoSuchVersion`): reading code used
|
||||
`Uuid::from_slice(..).unwrap_or_default()`, converting an empty metadata
|
||||
value into `Uuid::nil()`. Fixed by the `and_then`/`filter` pattern above.
|
||||
- `warm_backend_s3sdk` ignored the remote version and range options on
|
||||
GET/DELETE.
|
||||
- `copy_object` returned 501 (`NotImplemented`) for tiered objects on
|
||||
self-copy with `--storage-class`, blocking de-tiering via
|
||||
`mc cp --storage-class STANDARD obj obj`. Fixed by writing the
|
||||
tier-fetched `put_object_reader` back through `put_object`.
|
||||
@@ -1,3 +1,8 @@
|
||||
> **Archived implementation plan/tracker** — moved from `docs/architecture/` (2026-07).
|
||||
> Kept for history; not maintained. File paths inside may reflect the pre-#3929
|
||||
> module layout (e.g. `crates/ecstore/src/rebalance.rs` is now
|
||||
> `crates/ecstore/src/store/rebalance.rs`; `set_disk.rs` is now `set_disk/`).
|
||||
|
||||
# Architecture Migration Progress
|
||||
|
||||
Status values: `[ ]` not started, `[~]` in progress, `[x]` complete, `[!]` blocked.
|
||||
+5
@@ -1,3 +1,8 @@
|
||||
> **Archived implementation plan/tracker** — moved from `docs/architecture/` (2026-07).
|
||||
> Kept for history; not maintained. File paths inside may reflect the pre-#3929
|
||||
> module layout (e.g. `crates/ecstore/src/rebalance.rs` is now
|
||||
> `crates/ecstore/src/store/rebalance.rs`; `set_disk.rs` is now `set_disk/`).
|
||||
|
||||
# Rebalance and Decommission Follow-up Review Implementation Plan
|
||||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||
+5
@@ -1,3 +1,8 @@
|
||||
> **Archived implementation plan/tracker** — moved from `docs/architecture/` (2026-07).
|
||||
> Kept for history; not maintained. File paths inside may reflect the pre-#3929
|
||||
> module layout (e.g. `crates/ecstore/src/rebalance.rs` is now
|
||||
> `crates/ecstore/src/store/rebalance.rs`; `set_disk.rs` is now `set_disk/`).
|
||||
|
||||
# Rebalance and Decommission Implementation Plan Index
|
||||
|
||||
> This index is based on `docs/architecture/rebalance-decommission-remediation-plan.md`. The remediation scope is intentionally split into smaller implementation plans because the fixes touch independent risk areas: object-version safety, distributed operation semantics, data movement internals, and operational hardening.
|
||||
+5
@@ -1,3 +1,8 @@
|
||||
> **Archived implementation plan/tracker** — moved from `docs/architecture/` (2026-07).
|
||||
> Kept for history; not maintained. File paths inside may reflect the pre-#3929
|
||||
> module layout (e.g. `crates/ecstore/src/rebalance.rs` is now
|
||||
> `crates/ecstore/src/store/rebalance.rs`; `set_disk.rs` is now `set_disk/`).
|
||||
|
||||
# Rebalance and Decommission Phase 1 Safety Plan
|
||||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||
+5
@@ -1,3 +1,8 @@
|
||||
> **Archived implementation plan/tracker** — moved from `docs/architecture/` (2026-07).
|
||||
> Kept for history; not maintained. File paths inside may reflect the pre-#3929
|
||||
> module layout (e.g. `crates/ecstore/src/rebalance.rs` is now
|
||||
> `crates/ecstore/src/store/rebalance.rs`; `set_disk.rs` is now `set_disk/`).
|
||||
|
||||
# Rebalance and Decommission Phase 2 Data Movement Plan
|
||||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||
+5
@@ -1,3 +1,8 @@
|
||||
> **Archived implementation plan/tracker** — moved from `docs/architecture/` (2026-07).
|
||||
> Kept for history; not maintained. File paths inside may reflect the pre-#3929
|
||||
> module layout (e.g. `crates/ecstore/src/rebalance.rs` is now
|
||||
> `crates/ecstore/src/store/rebalance.rs`; `set_disk.rs` is now `set_disk/`).
|
||||
|
||||
# Rebalance and Decommission Phase 3 Hardening Plan
|
||||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||
+5
@@ -1,3 +1,8 @@
|
||||
> **Archived implementation plan/tracker** — moved from `docs/architecture/` (2026-07).
|
||||
> Kept for history; not maintained. File paths inside may reflect the pre-#3929
|
||||
> module layout (e.g. `crates/ecstore/src/rebalance.rs` is now
|
||||
> `crates/ecstore/src/store/rebalance.rs`; `set_disk.rs` is now `set_disk/`).
|
||||
|
||||
# Rebalance and Decommission Post-Remediation Review
|
||||
|
||||
> **Status:** Updated for branch `cxymds/rebalance-decommission-remediation`.
|
||||
+5
@@ -1,3 +1,8 @@
|
||||
> **Archived implementation plan/tracker** — moved from `docs/architecture/` (2026-07).
|
||||
> Kept for history; not maintained. File paths inside may reflect the pre-#3929
|
||||
> module layout (e.g. `crates/ecstore/src/rebalance.rs` is now
|
||||
> `crates/ecstore/src/store/rebalance.rs`; `set_disk.rs` is now `set_disk/`).
|
||||
|
||||
# Rebalance and Decommission Remediation Plan
|
||||
|
||||
> This document turns `docs/architecture/expert-review-analysis.md` into an actionable remediation backlog. It is intentionally split into independent fix blocks so each item can be analyzed, assigned, implemented, and verified separately.
|
||||
+5
@@ -1,3 +1,8 @@
|
||||
> **Archived implementation plan/tracker** — moved from `docs/architecture/` (2026-07).
|
||||
> Kept for history; not maintained. File paths inside may reflect the pre-#3929
|
||||
> module layout (e.g. `crates/ecstore/src/rebalance.rs` is now
|
||||
> `crates/ecstore/src/store/rebalance.rs`; `set_disk.rs` is now `set_disk/`).
|
||||
|
||||
## Related Issues
|
||||
|
||||
N/A
|
||||
Reference in New Issue
Block a user