mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-10 13:58:24 +01:00
V2 runtime packages: - sw-block/runtime/masterv2: identity authority (desired state, heartbeat handling, promotion arbitration via SelectPromotionCandidate) - sw-block/runtime/volumev2: per-volume micro-cluster shell (node, orchestrator, control session, iSCSI frontend, takeover gate, failover session + driver, replica summary reconstruction) - sw-block/runtime/purev2: RF1 execution shell (engine + store + dispatcher + local boundary observations) - sw-block/runtime/protocolv2: three-channel separation (heartbeat/assignment/query + replica summary) V2 binaries: - sw-block/cmd/v2singleblock: single-node RF1 block server - sw-block/cmd/purev2rf1: minimal RF1 runtime binary Milestone capabilities: - RF1 write/read/sync with engine-driven mode projection - masterv2 ↔ volumev2 heartbeat convergence + assignment reissue - Promotion query with fresh CommittedLSN/WALHeadLSN evidence - Replica summary for bounded takeover reconstruction - Primary-loss reconstruction from peer summaries (fail-closed gate) - In-process failover driver with session observability - Local boundary observations feed engine (Committed/Durable/Checkpoint) Design docs: - v2-two-loop-protocol.md: identity vs data-control separation - v2-automata-ownership-map.md: event/command ownership split - v2-loop1-surface-draft.md: heartbeat/query/assignment field spec - v2-volumev2-single-node-mvp.md: target layering - v2-kernel-closure-review.md: per-volume micro-cluster principle - v2-pure-runtime-rf1-bootstrap.md, v2-capability-map.md, v2-proof-and-retest-pyramid.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3.0 KiB
3.0 KiB
V2 VolumeV2 Single-Node MVP
Date: 2026-04-05 Status: active
Purpose
This note defines the target shape for a single-node volumev2 MVP that can
ship as a normal block service before HA/failover exists.
The core idea is:
masterv2is fully new control ownershipvolumev2is a new shell and brain hostblockvoland related backend mechanics remain reusable muscles
Target Layering
volumev2 should be strengthened around four layers.
1. Engine
Owner:
sw-block/engine/replication/
Responsibility:
- state
- event ingestion
- command emission
- outward projection
Rule:
- semantic truth lives here
- no backend I/O or network ownership
2. Engine Interface
Owner:
- command/event vocabulary between control/runtime and backend execution
Responsibility:
- assignment -> event translation
- observation -> event translation
- command -> execution dispatch contract
Rule:
- runtime shell may not mutate engine truth directly
3. Control Plane
Owner:
masterv2 <-> volumev2coordination
Responsibility:
- node identity
- registration and heartbeat
- assignment receipt
- state reporting
- future recovery-control vocabulary (
keepup,catchup,rebuild)
Rule:
- control plane carries protocol messages
- it does not own local data execution
4. Data Plane
Owner:
- local storage and serving mechanics
Responsibility:
- WAL/extent management
- read/write/flush
- background workers
- receiver/shipper mechanics
- NVMe/iSCSI/frontend serving
Rule:
- data plane knows how to execute
- it does not define publication or role semantics
Single-Node MVP Contract
The first ship-capable volumev2 slice should include:
masterv2declaration of one RF1 primary volumevolumev2control session to fetch assignments- local create/open through reused
blockvol - local primary assignment application through the V2 engine
- local read/write plus restart durability
- debug/status snapshot
- one small executable entrypoint for smoke usage
The first slice explicitly excludes:
- failover
- RF2 replication
- catch-up/rebuild ownership
- CSI
Why This Is Enough
This is enough to prove:
- the
masterv2 + volumev2head is viable volumev2can host V2 semantics while reusing V1 muscles- a useful non-HA block service can exist before HA complexity is added
Module Shape
Recommended package split:
sw-block/runtime/masterv2/sw-block/runtime/volumev2/sw-block/runtime/purev2/sw-block/engine/replication/sw-block/bridge/blockvol/
Within volumev2, strengthen toward:
control_session.goorchestrator.gonode.go- later:
heartbeat.go,frontend.go,workers.go
Stage Gate
volumev2 may be treated as a single-node MVP only when:
- assignment sync is repeatable and idempotent
- local IO is data-verified
- restart/open path is proven
- status/debug state is explicit
- no
weed/serverlifecycle owner is required
Related References
v2-pure-runtime-rf1-bootstrap.mdv2-proof-and-retest-pyramid.mdv2-capability-map.md