mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-20 13:30:46 +02: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>
34 lines
1015 B
Go
34 lines
1015 B
Go
package protocolv2
|
|
|
|
// ReplicaSummaryRequest asks one node for a bounded takeover/reconstruction
|
|
// summary for a specific volume. This is richer than promotion evidence, but
|
|
// still smaller than full internal engine/session state.
|
|
type ReplicaSummaryRequest struct {
|
|
VolumeName string
|
|
ExpectedEpoch uint64
|
|
}
|
|
|
|
// ReplicaSummaryResponse is the bounded summary a future primary can use to
|
|
// reconstruct recovery truth. It preserves distinct boundary semantics without
|
|
// exposing raw shipper/session internals.
|
|
type ReplicaSummaryResponse struct {
|
|
VolumeName string
|
|
NodeID string
|
|
Epoch uint64
|
|
Role string
|
|
Mode string
|
|
ModeReason string
|
|
RoleApplied bool
|
|
ReceiverReady bool
|
|
CommittedLSN uint64
|
|
DurableLSN uint64
|
|
CheckpointLSN uint64
|
|
TargetLSN uint64
|
|
AchievedLSN uint64
|
|
RecoveryPhase string
|
|
LastBarrierOK bool
|
|
LastBarrierReason string
|
|
Eligible bool
|
|
Reason string
|
|
}
|