Commit Graph
1295 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 b331ffc57a test(master): RF3 promotion with a missing required frontier must be refused
Reproducer for #181, unchanged from #184.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 19:42:57 -08:00
Ping Qiu c5a7f062a0 Merge pull request #185 from seaweedfs/docs/m5-fsync-numbers
docs: report guest fsync after the group-commit fix (#173)
2026-11-16 19:36:44 -08:00
Ping Qiu f54d50be4e Merge pull request #180 from seaweedfs/docs/invariants
docs: add the protocol contract (state machines and invariant ledger)
2026-11-16 19:36:37 -08:00
pingqiuandClaude Opus 5.5 c380bf0983 docs(design): update the fsync figures after the group-commit fix (#173)
agent-workspace-design.md (measured results) adds the post-#173 guest fsync
medians; block-design.md's known-issues entry says #173 removed the idle
group-commit wait (about 5.5 ms to 3.23 ms against 2.74 ms local) and keeps
the remaining lead (the checkpoint superblock fsync under the store lock).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 19:15:17 -08:00
pingqiuandClaude Opus 5.5 806045889b docs(measurements): say the backend Sync figure is a mean and which setups were gated
The backend Sync figure is the mean over the gate window, and the gate that
every guest fsync reaches the backend sync ran on the four Seaweed Block
setups (not on the local disk).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:17:03 -08:00
pingqiuandClaude Opus 5.5 4d9f00fe9f docs(invariants): narrow four statements to what the code and tests assert
Review follow-up:
- INV-WAL-SYNC-FRONTIER-001: Sync never reports an uncovered write durable;
  it returns the global synced frontier, at or above the caller's own write,
  covered by a completed fsync (TestWALGenerationFirstCallerReturnOrdering).
- INV-AUTH-PERSIST-BEFORE-PUBLISH-001 and the M2 row: store-backed only; a
  failed write publishes nothing but its outcome may be unknown, and the
  workspace path latches that uncertainty.
- INV-FE-LINEAGE-GATE-001: the volume-ID facet is marked as code reading.
- INV-CUT-READMISS-001, the M4 row and agent-workspace-design.md: a HEAD
  fill never overwrites a newer local extent version; a WAL-only write wins
  on reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:15:52 -08:00
pingqiuandClaude Opus 5.5 cfc48472c6 docs: mark the three confirmed invariant gaps as open issues (#181, #182, #183)
Each gap noted in docs/design/invariants.md is now confirmed by a red test
and tracked as an open issue: #181 (RF=3 promotion admitted with required
LSN zero), #182 (Invalidate bypasses the NeedsRebuild terminal state) and
#183 (a genesis Bind for a second slot of a bound volume).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:14:06 -08:00
pingqiuandClaude Opus 5.5 7e33a89f8c docs: report guest fsync after the group-commit fix (#173)
The README, the agent-workspace diagram and docs/workspace-measurements.md
still said guest fsync was about 7 ms against 3 ms local. A rerun after #173
(same lab pack and host, the same four setups, fio 4 KiB random write one at
a time with fsync after every write, median of 3 boots) measured a median of
3.23 ms (ublk, walstore-chunk) against 2.74 ms local. The original runs stay
as history in docs/workspace-measurements.md.

Documentation only; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:05:23 -08:00
pingqiuandClaude Opus 5.5 458fb83a93 docs: add the protocol contract (state machines and invariant ledger)
docs/design/invariants.md lists the six state machines Seaweed Block
implements (walstore, authority, replica role and peer, workspace HEAD
holder and takeover, the cut pipeline, the chunk lifecycle) with each
transition's guard and enforcing function, and a 71-row invariant ledger
(69 ACTIVE, 2 STUB): statement, machine and transition, enforcement, tests,
TLA+ property and status. AGENTS.md gets a 'Protocol contract' section, and
the three design docs and the README link the new doc.

Documentation only; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 17:01:38 -08:00
Ping Qiu d662140b45 Merge pull request #178 from seaweedfs/chore/charts-example-values
charts: move the blockNodes example to examples/values-3node.yaml with documentation addresses
2026-11-16 17:00:03 -08:00
pingqiuandClaude Opus 5.5 d96056b4c3 charts: the README's NVMe/RDMA snippet uses the values.yaml structure
blockNodes is a top-level list and frontendNetworkClass is a per-node
field; the snippet nested blockNodes under network and put
frontendNetworkClass beside it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:37:27 -08:00
pingqiuandClaude Opus 5.5 e585d80f8e docs(releases): replace lab addresses with RFC 5737 documentation addresses
nvme-rdma-capability-boundary.md and nvme-tcp-supported-lab.md recorded the
lab's private addresses. Replace them with documentation addresses
(192.0.2.12 internal, 198.51.100.11/12 frontend, matching the chart's
example nodes) and say so at the top of each record. Host names stay
anonymized as 'lab host A/B'; meaning is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:37:26 -08:00
pingqiuandClaude Opus 5.5 f5e610cabe charts: move the blockNodes example to examples/values-3node.yaml with documentation addresses
The chart README carried a full values example with lab node names and
addresses, and values.yaml defaulted blockNodes to a lab host name.

- charts/seaweed-block/examples/values-3node.yaml: the README's values
  example as a file, with nodes node-a/node-b/node-c and RFC 5737
  documentation addresses (192.0.2.x internal, 198.51.100.x frontend).
- README: links the example instead of inlining it; the NVMe/RDMA snippet
  uses the same placeholder node and addresses.
- values.yaml: the default block node is the placeholder block-node-1
  (internalIP stays 127.0.0.1) with a pointer to the example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:36:51 -08:00
Ping Qiu 84aa2146a3 Merge pull request #179 from seaweedfs/docs/cleanup-and-design
docs: delete outdated docs, simplify the rest, and split the design reference with diagrams
2026-11-16 16:35:28 -08:00
Ping Qiu 621131afc9 Merge pull request #177 from seaweedfs/test/replication-repeat-safe
test: make replication recovery session fixtures repeat-safe
2026-11-16 16:35:22 -08:00
pingqiuandClaude Opus 5.5 63dcb49a54 docs: delete outdated docs, simplify the rest, and split the design reference with diagrams
- Delete the stale roadmap and eight wiki planning pages (git history keeps
  them); move the only unique content (Phase 166-170 write-path experiment
  results) into docs/releases/nvme-tcp-supported-lab.md.
- Simplify the remaining user docs; duplicated non-claim lists link to
  docs/kubernetes-status.md; lab host names and local paths are removed.
- Split docs/design/block-design.md into core, agent-workspace-design.md and
  kubernetes-block-design.md; add four SVG diagrams of the on-disk and remote
  structures and new mermaid diagrams.
- mkdocs.yml nav and README links follow the new layout; the two gate
  scripts drop the one check each that read a deleted file.

Docs only; no product code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:16:02 -08:00
pingqiu 4d5e5f556f test: derive recovery session markers from current live sessions 2026-11-16 16:10:11 -08:00
Ping Qiu 86530111dc Merge pull request #173 from seaweedfs/fix/group-commit-singleton-latency
perf(storage): avoid collection delay for singleton syncs
2026-11-16 16:08:11 -08:00
pingqiu f6c1f52c1d test: write the later block only after the first physical fsync completed 2026-11-16 15:52:48 -08:00
pingqiu ddcc379470 test: assert durable global Sync frontier and retain replay fixture WAL 2026-11-16 15:50:40 -08:00
pingqiu a89bf2aced test: fail stalled backend waits with goroutine dump and real-style Sync control 2026-11-16 15:50:09 -08:00
pingqiu d563609359 test: deadline concurrent proxy work and close failed provider setup 2026-11-16 15:50:09 -08:00
pingqiu 58d96e2ba4 test: bound completion waits and diagnostic children and prequeue cleanup 2026-11-16 15:50:09 -08:00
pingqiu afdead8ad9 test: correct concurrent benchmark extraction 2026-11-16 15:50:09 -08:00
pingqiu 192308a102 test: cover QD1 physical sync acknowledgements and concurrent backend proxy 2026-11-16 15:50:09 -08:00
pingqiu 061d94c3b0 perf: dispatch batches accumulated during physical sync without another delay 2026-11-16 15:50:09 -08:00
pingqiu b287bc657a test: require immediate queued follow-up batches and abrupt backend reopen 2026-11-16 15:50:09 -08:00
pingqiu 28b52c257f perf: dispatch singleton group commits without collection delay 2026-11-16 15:50:09 -08:00
pingqiu 7c00316660 test: singleton sync must dispatch before collection timeout 2026-11-16 15:50:09 -08:00
Ping Qiu 942019201c Merge pull request #176 from seaweedfs/docs/readme-v2
docs: README v2 with standalone deployment, Kubernetes status and workspace measurements
2026-11-16 15:33:07 -08:00
Ping Qiu c67d9db0a1 Merge pull request #172 from seaweedfs/fix/walstore-sticky-fsync-error
storage: latch the first fsync or append I/O fault of an open walstore (#170, #171)
2026-11-16 15:33:01 -08:00
pingqiuandClaude Opus 5.5 663ab3b2c3 docs: README v2 with standalone deployment, Kubernetes status and workspace measurements
The README is rewritten to about 230 lines. Detail that used to live in the
README moves to linked documents:

- docs/standalone-deployment.md: running blockmaster and blockvolume
  without Kubernetes, with a read-only first-volume check and a separate
  write test for scratch hosts.
- docs/kubernetes-status.md: the Kubernetes alpha feature status and
  non-claims.
- docs/workspace-measurements.md: the agent workspace measurements.
- deploy/config and deploy/systemd: env files, a topology example and
  systemd units for blockmaster and blockvolume (plus a ublk variant).

docs/quickstart-kubernetes.md and docs/design/block-design.md are updated
to match current main (auto durable-impl default, fuzz targets, the
concurrent filer CAS test, the CI workflow, the TLA+ specs in docs/spec),
and docs/assets/seaweed-block-hero.svg is refreshed.

Docs and example configuration only; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 14:01:51 -08:00
Ping Qiu eac2ff0587 Merge pull request #175 from seaweedfs/test/decoder-fuzz-tests
test: Go native fuzz targets for the WAL, manifest and HEAD decoders
2026-11-16 13:43:15 -08:00
Ping Qiu 72eefdbe28 Merge pull request #174 from seaweedfs/feat/walstore-default-smartwal-experimental
blockvolume: walstore is the default for new volumes; smartwal is experimental
2026-11-16 13:41:15 -08:00
pingqiuandClaude Opus 5.5 56bdae803a storage: never close a held-test store under a worker that did not settle
Review of b264c233 (test P2): when startWorker's bounded join timed out it
reported an error and then let the store's Close run under the still-live
worker, which could block on the worker's locks. On a join timeout it now
fails the test with every goroutine's stack and marks the store leaked;
heldStore's cleanup then leaves that store open instead of closing it.

TestWALStoreStartWorkerReportsAWorkerThatNeverSettles drives startWorker
through a recorder with a short join bound and a worker that never
returns: the cleanup ends within the bound with one error carrying the
goroutine dump, and the store is marked leaked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 13:40:47 -08:00
pingqiuandClaude Opus 5.5 b264c2330e storage: join held workers on failure paths; prove arrival at the fsync boundary
Review of 1af91e6a (two test P2):
- Every worker goroutine of the held-caller tests runs through
  startWorker, whose cleanup (ordered before the store's Close) opens the
  test's gates and joins the worker within a bound, so a test that stops
  early never closes the store under a live flush or Sync.
  TestWALStoreHeldWorkersSettleOnAFailurePath stops a test while a flush
  is held inside the store and checks the worker finished before the store
  was closed.
- The serialization oracle waits until the competing flusher reaches
  syncFile (testBeforeFileSync, a nil-by-default hook just before
  fileSyncMu) before checking that its extent fsync does not run while the
  WAL fsync is in flight.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 13:19:33 -08:00
pingqiuandClaude Opus 5.5 411c6ce598 chunkstore: fuzz the manifest JSON reader and the HEAD document
- FuzzDecodeManifestJSON: never panics; an accepted document decodes to
  what encoding/json alone decodes.
- FuzzDecodeHeadDocument: never panics; a rejected document yields the
  zero head; an accepted head re-encodes (headEntry) and decodes back,
  also through decodeHead with the entry's extended attributes.

Known gap, pinned by a test: a segmented root rejected by validateRoot is
returned half-built with the error (no caller reads it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 13:06:00 -08:00
pingqiuandClaude Opus 5.5 ca96d50bba storage: fuzz the smartwal record and parallelwal record and header codecs
- smartwal: decode never panics, a rejected slot is the zero record, an
  accepted slot round-trips; slots with non-zero reserved bytes (covered by
  the CRC but ignored) are pinned as a known gap.
- parallelwal: an accepted record re-encodes to exactly its bytes; every
  encoded record decodes back; a CRC-valid header slot built from fuzz bytes
  is rejected as the zero header or survives an encode/decode round trip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 13:06:00 -08:00
pingqiuandClaude Opus 5.5 cbfd01182f storage: fuzz the walstore WAL entry codec
Go native fuzz targets (seed corpus runs as unit tests):
- FuzzDecodeWALEntry: arbitrary bytes never panic; an error returns the
  zero entry; an accepted record is self-consistent and re-encodes to
  exactly its bytes.
- FuzzDecodeWALEntryFields: records with a valid CRC and EntrySize but
  arbitrary fields, so the fuzzer reaches the decoder's acceptance rules.
- FuzzWALEntryRoundTrip: every entry the encoder accepts decodes back.

Shapes the decoder accepts but the encoder never writes (empty write,
batch shape, barrier with a Length, unknown type) and entries the encoder
accepts that do not decode back (unknown type, inconsistent padding) are
pinned as known gaps (knownWALDecodeGap, knownWALEncodeGap); any other
shape fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 13:06:00 -08:00
Ping Qiu cc887bae37 Merge pull request #167 from seaweedfs/fix/workspace-moveback-claim
durable: refuse to attach an old local root under another holder's HEAD (P0, #165)
2026-11-16 12:52:24 -08:00
pingqiuandClaude Opus 5.5 068d30a6e0 durable: refuse to attach an old local root under another holder's HEAD
A workspace that moved A -> B -> A reattached A's surviving local root as
an existing volume without claiming HEAD: it served A's stale image and its
next (hash-mode) cut overwrote B's acknowledged, synced and published
writes. A non-fresh attach now reads HEAD first; if another holder
published it (Gen != 0, Holder != this holder), the attach fails closed
with ErrChunkStaleLocalRoot wrapping storage.ErrChunkLayerFenced: the
volume is not served and the attach is not retried. One log line and the
status evidence name the volume, the local root, HEAD's holder, generation
and epoch, and say to remove or quarantine the root; the next attach then
starts fresh from HEAD. The deferred (authority-wait) attach records the
same evidence. Recreating the root automatically is a follow-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 12:49:27 -08:00
pingqiuandClaude Opus 5.5 9828967392 durable: RED: a move back onto an old root must be refused, visibly
Move-back tests for the chunk provider. The existing local root of a
workspace that moved A -> B -> A must not attach: no reads or writes, no
cut, HEAD unchanged, a typed ErrChunkStaleLocalRoot (fenced) and status
evidence that says to remove or quarantine the root, also when the attach
is deferred until the assignment arrives. After the root is removed the
fresh path serves B's image. Controls that pass today: a same-holder
reattach at a newer epoch, an existing root with no HEAD, and a holder whose
HEAD a newer epoch took over never cuts over it.

ErrChunkStaleLocalRoot is declared so the tests build; nothing returns it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 12:49:27 -08:00
pingqiuandClaude Opus 5.5 1fed134e59 durable: RED: a move back onto an old root serves and publishes a stale image
A workspace moves A -> B -> A and A's old durable root is still on disk.
A attaches it as an existing (non-fresh) volume, so it never claims HEAD:
it serves its own stale image instead of B's published writes, and its
next cut (hash mode) overwrites B's acknowledged, synced and published
data in HEAD.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 12:49:26 -08:00
Ping Qiu 1c497b0eb0 Merge pull request #169 from seaweedfs/docs/tla-spec
docs/spec: add TLA+ models of the volume lifecycle, takeover, WAL recovery, cut pipeline and GC timing
2026-11-16 12:48:13 -08:00
Ping Qiu c2e13b45cf Merge pull request #164 from seaweedfs/docs/block-design
docs: add the block design document
2026-11-16 12:48:07 -08:00
Ping Qiu dbefb9c7db Merge pull request #163 from seaweedfs/test/real-filer-concurrent-head-cas
Test concurrent HEAD CAS through real filer RPCs
2026-11-16 12:48:01 -08:00
Ping Qiu 248f17017e Merge pull request #162 from seaweedfs/chore/scrub-reviewer-names-in-comments
chore: drop reviewer names and ruling timestamps from code comments
2026-11-16 12:47:54 -08:00
Ping Qiu 2699f82a94 Merge pull request #168 from seaweedfs/ci/test-workflow
ci: add a test workflow (build, vet, go test -short) and harden dead-port tests
2026-11-16 12:47:48 -08:00
pingqiuandClaude Opus 5.5 ba5eeec356 blockvolume: help and README say auto refuses a walstore-chunk root
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 12:47:04 -08:00
pingqiuandClaude Opus 5.5 d65471908f durable: auto refuses a chunk-managed root instead of opening it as walstore
walstore-chunk volumes share walstore's on-disk format (SWBK), and on a
fresh host their published bytes may exist only in the remote HEAD. Opened
by auto as plain walstore, such a root would skip chunk recovery, install no
read-miss or fencing hooks and serve the local, absent extent.

Auto now refuses any volume whose root carries chunk metadata
(<volume>.chunk*: fresh marker, dirty bitmap and deltas, presence map),
on both the open and the create path, with ErrImplKindMismatch naming the
files and asking for --durable-impl=walstore-chunk with its remote
configuration. Nothing is deleted or converted.

Tests: a lazy fresh-host chunk root (block published on host A, host B
attached and closed before fetching it) is refused by auto and read
exactly by the explicit walstore-chunk selector; any chunk root is
refused; a stray fresh marker without a volume file is refused and left
in place. autoProvider registers its cleanup (review P3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 12:46:51 -08:00