mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-10 10:06:12 +00:00
P2d ratified + implemented in seaweed_block (cb8ff1c). Architect
review against §6.8 / consensus v3.8 nine MUSTs identified three
correctness gaps to close, sequenced as C1..C3:
G-WRITE-RACE — Sender.writeFrame vs EmitFunc.conn.Write on
same dual-lane conn (no shared mutex).
G-RECORDSHIPPED — WalShipper-routed emits never advance
coord.shipCursor.
G-TIMER — no self-driving periodic emit-from-cursor;
primary-idle starvation possible. NotifyAppend
ignores debt (cursor < head) and emits new tail
directly — violates send(incoming, debt).
G-PARALLEL — Sender.Run runs streamBase fully before
sink.DrainBacklog. P6 / G3 requires overlap.
C1 — shared writeMu + post-emit RecordShipped hook (duck-typed
sink sub-interfaces WriteMu / SetPostEmitHook).
C2 — WalShipper internal timer + NotifyAppend debt-aware dispatch
using cursor < head (NOT lsn > cursor + 1; that edge-case
fails at dense single-LSN debt). data arg canonical only on
no-debt path; debt path drain reads substrate.
C3 — Sender.Run errgroup BASE ∥ WAL parallel; both write through
shared writeMu (mutex-bounded interleaving, not zero-blocking).
§11.3 records the §6.8 nine-MUST compliance receipt expected
post-C3.
Companion implementation lands on
seaweed_block g7-redo/wal-shipper-impl as three commits.
sw-block
Private WAL V2 and standalone block-service workspace.
Purpose:
- keep WAL V2 design/prototype work isolated from WAL V1 production code in
weed/storage/blockvol - allow private design notes and experiments to evolve without polluting V1 delivery paths
- keep the future standalone
sw-blockproduct structure clean enough to split into a separate repo later if needed
Suggested layout:
design/: shared V2 design docsprototype/: code prototypes and experiments.private/: private notes, phase development, roadmap, and non-public working material
Repository direction:
- current state:
sw-block/is an isolated workspace insideseaweedfs - likely future state:
sw-blockbecomes a standalone sibling repo/product - design and prototype structure should therefore stay product-oriented and not depend on SeaweedFS-specific paths