mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
5.5 KiB
5.5 KiB
Protocol And State-Machine Catalog
This page catalogs the state machines and mini-protocols that should be documented with Mermaid diagrams. It links to the current source references and names the code or gate area that owns the behavior.
The catalog is intentionally broader than the current release claim. Some protocols are implemented and gated; others are planned but need the same fact -> judgment -> action -> evidence structure before becoming product claims.
Existing Source References
- Runtime State Machines
internal/docs/protocol/README.mdinternal/docs/protocol/invariant-ledger.mdinternal/docs/protocol/managed-volume-operations-model.mdinternal/docs/protocol/operator-readiness-contract.mdinternal/docs/protocol/finalizer-delete-safety-contract.mdinternal/docs/ref/lifecycle-owner-control-contract.mdinternal/docs/ref/operation-layer-v0.5-release-train.md
Catalog
| # | Protocol / state machine | Current source | Main code area | Mermaid status |
|---|---|---|---|---|
| 1 | Control-plane placement to authority publication | docs/runtime-state-machines.md |
core/host/master, launcher/authority code |
existing diagram |
| 2 | Data-plane write / sync / WAL boundary | docs/runtime-state-machines.md |
cmd/blockvolume, core/storage |
existing diagram |
| 3 | Recovery / replication peer lifecycle | docs/runtime-state-machines.md, internal/docs/ref/rf2-promotion-ready-recovery-contract.md |
recovery / replication paths | existing high-level diagram; needs productized rebuild version |
| 4 | Frontend eligibility / stale-owner fencing | docs/runtime-state-machines.md, internal/docs/protocol/invariant-ledger.md |
frontend projection, authority bridge | existing high-level diagram |
| 5 | CSI node stage/publish flow | docs/runtime-state-machines.md, core/csi |
cmd/blockcsi, core/csi |
existing sequence diagram |
| 6 | ManagedVolume readiness projection | internal/docs/protocol/managed-volume-operations-model.md |
core/ops |
needs detailed Mermaid |
| 7 | Kubernetes node readiness evidence | internal/docs/protocol/operator-readiness-contract.md |
core/ops live node evidence |
needs detailed Mermaid |
| 8 | Cleanup visibility / cleanup verifier evidence | internal/docs/protocol/operator-readiness-contract.md, internal/docs/ref/operation-layer-v0.5-release-train.md |
cleanup verifier, core/ops/cleanup_evidence.go |
needs detailed Mermaid |
| 9 | Delete-safety decision model | internal/docs/protocol/finalizer-delete-safety-contract.md |
core/ops delete-safety projection |
initial diagram in State Machines |
| 10 | Lifecycle-owner finalizer add/release | internal/docs/ref/lifecycle-owner-finalizer-strategy.md, internal/docs/ref/lifecycle-owner-control-contract.md |
core/ops/lifecycle_owner_controller.go |
initial sequence in State Machines |
| 11 | Kubernetes admission boundary for lifecycle-owner | internal/docs/ref/phase42-lifecycle-owner-api-admission-gate.md |
Helm VAP/RBAC templates | needs VAP decision diagram |
| 12 | Action model evaluator | internal/docs/protocol/engine-design-guidelines.md, Phase 38 docs |
core/ops/action_model.go |
needs Mermaid decision tree |
| 13 | Status writer / CRD schema conformance | Phase 40 status API docs | core/ops/kubernetes_status_writer.go |
needs request/validation diagram |
| 14 | SmartWAL corruption fail-closed path | Phase 34 finished plan and QA sign-offs | core/storage, cmd/blockvolume, core/ops projection |
needs detailed failure-path diagram |
| 15 | iSCSI ALUA / dm-multipath path state | internal/docs/ref/iscsi-alua-technical-note.md, stage2-transparent-multipath-host-failover-spec.md |
iSCSI frontend and host path evidence | needs protocol diagram |
| 16 | NVMe ANA parity path | internal/docs/ref/nvme-ana-technical-note.md, nvme-ana-parity-plan.md |
future NVMe frontend path | planned diagram |
| 17 | Returned-replica rebuild / reintegration | roadmap + recovery refs | recovery + future lifecycle action owner | planned diagram |
| 18 | TestOps run lifecycle and evidence bundle | internal/docs/ref/testops-control-data-contract.md, testops/ |
runner/scenarios | needs run-state diagram |
| 19 | Future read-write action execution | Phase 38-44 contracts + roadmap | future safe_k8s/host_cleanup/authority/data lifecycle executors | initial diagram in read-write control-plane deep dive |
| 20 | GPUDirect/cuFile compatibility gate | future design + NVIDIA GDS/cuFile docs | future TestOps helper + ops evidence ingestion | initial diagram in GPUDirect deep dive |
Diagram Priority
The first detailed Mermaid expansions should be:
- Operation layer v0.5: facts -> judgment -> action -> admission -> evidence.
- ManagedVolume readiness projection: how ready/blocked/unknown wins.
- CSI lifecycle: PVC -> CreateVolume ->
SwBlockVolumeCR -> status/finalizer. - SmartWAL dirty-failure path: storage fault -> local readiness block -> projection no false Ready.
- TestOps gate lifecycle: live/replay/adversarial gates and evidence bundles.
- Future mutating action execution: preconditions -> policy -> executor -> terminal evidence.
- GPUDirect/cuFile compatibility: GPU/GDS prereq -> mount probe -> transfer checksum -> supported/blocked/unsupported.
Rule For Adding A Diagram
Every Mermaid diagram should name:
state names
transition trigger
owner component
evidence artifact
failure state
QA gate
If a diagram cannot name the evidence artifact or gate, it is probably still a design sketch rather than a product behavior.