mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
docs: align create admission table diagram and model scope with capacity bound
This commit is contained in:
1 parent
7a1f9826fc
commit
b59e690969
3 files changed
+9
-2
No files matched your search
@@ -183,6 +183,9 @@ stateDiagram-v2
|
||||
|
||||
## 6. Snapshots, forks, retention, GC, volume delete
|
||||
|
||||
**Create capacity.** New volumes larger than 16 TiB - 4 KiB (17,592,186,040,320 bytes) are refused before provisioning, WAL allocation or durable VOLUME creation. CSI, lifecycle intent, Catalog and local WAL create share the same bound. A fork inherits the existing source geometry. Existing store-open formats are unchanged. This is static admission, not a new lifecycle state.
|
||||
|
||||
|
||||
- **Snapshot** (`Catalog.CreateSnapshot`): claim the name with an exclusive name record `{request, attempt}` (a retry gets its own attempt back); check the volume is not being deleted; write an intent with a deadline; re-check the deadline; exclusively create `snaps/<name>/<attempt>` holding a copy of the HEAD root. An unknown outcome keeps the intent; the caller retries with the same request id.
|
||||
- **Fork** (`Catalog.Fork`): claim the parent snapshot, check the source is not being deleted, write the target `VOLUME` (origin fork), then a HEAD at gen 1, epoch 0, no holder, with the parent's `RemoteLSN` and references. No segment or chunk is copied: the fork's references are owner-qualified, so it reads the parent's objects, and its root alone keeps them live after the parent snapshot is deleted.
|
||||
- **Retention** (`retention.go`): classes `semantic` and `pinned`; newest N, recent window and log-spaced keeps; a snapshot with a live fork claim is always kept; deletion uses the same conditional mark as `DeleteSnapshot`.
|
||||
@@ -203,7 +206,7 @@ HEAD states:
|
||||
|
||||
```mermaid
|
||||
stateDiagram-v2
|
||||
[*] --> active: initial HEAD (gen 1, epoch 0) or fork HEAD
|
||||
[*] --> active: create within capacity bound (gen 1, epoch 0) or inherited fork HEAD
|
||||
active --> active: holder's cut CAS (gen+1)
|
||||
active --> detached: Detach final cut
|
||||
detached --> active: takeover CAS (higher epoch, new holder)
|
||||
|
||||
@@ -229,7 +229,7 @@ HEAD states, snapshots, forks, intents, key bindings, GC and volume delete in th
|
||||
|
||||
| From | To | Guard | Enforced in | Protects |
|
||||
|---|---|---|---|---|
|
||||
| — | `active` (gen 1, epoch 0) | the first HEAD is an exclusive create (`CASHead` with expected gen 0); a fork HEAD carries the parent's `RemoteLSN` and references | `core/frontend/chunkstore/chunk_remote.go` `CASHead`; `core/frontend/chunkstore/catalog.go` `EnsureVolume`, `Fork` | `INV-WS-HEAD-CAS-001` |
|
||||
| — | `active` (gen 1, epoch 0) | new volume capacity is at most 16 TiB - 4 KiB before creation; the first HEAD is an exclusive create (`CASHead` with expected gen 0); a fork HEAD carries the parent's `RemoteLSN` and references | `core/frontend/chunkstore/chunk_remote.go` `CASHead`; `core/frontend/chunkstore/catalog.go` `EnsureVolume`, `Fork` | `INV-WS-HEAD-CAS-001` |
|
||||
| `active` | `active` | a holder's cut or a takeover CAS (M4, M5) | `core/frontend/chunkstore/chunk_remote.go` `CASHead` | `INV-WS-HEAD-CAS-001`, `INV-WS-HEAD-MONOTONE-001` |
|
||||
| `active` | `detached` | `Detach` final cut | `core/storage/chunk_layer.go` `chunkLayerImpl.Detach` | `INV-WS-CLEAN-MOVE-001` |
|
||||
| `detached` | `active` | takeover CAS by a new holder at a higher epoch | `core/storage/chunk_restore.go` `ClaimChunkHead` | `INV-WS-CLAIM-BEFORE-SERVE-001` |
|
||||
|
||||
@@ -274,3 +274,7 @@ Recover/reset snapshot recheck and saved-file readers are covered by the
|
||||
native `TestCutCOWV3_*` caller controls, not claimed as model proofs.
|
||||
The earlier thirteen-spec parse statement above predates this imported model;
|
||||
no new independent TLC/parse or cloud run is claimed here.
|
||||
|
||||
### Static volume create capacity
|
||||
|
||||
`INV-VOLUME-CREATE-SIZE-001` bounds a new volume to 16 TiB - 4 KiB. The current ControlPlane/ChunkLifecycle models abstract volume identity and create/delete ordering, not byte capacity or block geometry; this admission bound is not a TLC property. The actual CSI, lifecycle, Catalog and WAL create caller controls in `volume_size_limit_test.go` establish the bound before side effects. No modeled state or action is changed.
|
||||
Reference in new issue
Block a user