Files
seaweedfs/seaweed-block/docs/design
759b7f3a36 seaweed-block: test the import syncfs selector and report each store's import mode (on #13458) (#13469)
* seaweed-block: preserve unchanged imports and batch durable publication

* seaweed-block: name the rejected entry in a startup import error

The batch import returned the bare validation error, so a bad cluster-spec
node or placement seed stopped startup without saying which entry. The
per-entry RegisterNode/ApplyPlan loop named it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: name the import path in the freshness row and registry guard

Startup now replays nodes through ImportNodes, not RegisterNode; list it
where the freshness invariant and the registry-writer guard name the
writers. Drop a doubled blank line in the operations manual.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: poison a lifecycle store only on a persistence error

A node registration whose SeenAt cannot be encoded failed before any file
I/O, but RegisterNode latched the marshal error and every later mutation
returned ErrLifecycleRecoveryRequired until reopen. Latch only a
RecordPersistenceError, as the volume store already did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: keep a node's SeenAt when its declaration changes

registrationLocked kept SeenAt only for an unchanged declaration. A
restart that changed a node's declared pools or address stamped the
current time, so a silent node passed the stale-observation check. A
declaration without an observation time now keeps the stored one; a new
node still gets the current time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: use the import syncfs only on filesystems that report its errors

The batch path was chosen from the kernel release alone. On overlayfs,
syncfs checks the overlay superblock's writeback errors, not the upper
file's, and on FUSE it does not send FSYNC to the daemon, so an import
could publish records whose data never became durable. Select syncfs
only when the records directory is on ext4, xfs, btrfs or tmpfs, and keep
per-file fsync elsewhere. The startup line now reports the path for the
lifecycle store, after it exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: assert the imported values before the reopen check

The import step control compared the store's snapshot with a reopen, so
an import that synced and renamed but committed the old values passed.
Check the changed and unchanged values before and after reopen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: check both views after a removal retry

present() returned record && snapshot, so a removal that cleared only one
view passed the final check. Report both and require both absent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: assert the one-second fail-stop bound

The blocked-logger control checked only exit status 1 inside a four-second
child timeout, so a longer exit timer still passed. The child now reports
when it triggers the failure, and the parent requires exit within the
one-second deadline plus one second of scheduler tolerance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: add the lifecycle machine's transition table

Every other Part A machine lists its transitions with guard, enforcing
code and Part B rows; the lifecycle record I/O machine had only its
diagram. Also name DeletePlacement and DeleteVolume beside RemoveNode in
the open gap: none of them syncs the directory after removing a record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: scope the manual's lifecycle exit policy to the stores it covers

Only the node, placement and volume stores have the fail-stop handler.
State that deletion-reservation and workspace-binding write failures
return the error without exiting, and that an uncertain binding store
needs a restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: test the import's syncfs selection through the production selector

TestSyncfsFilesystemGate checked the filesystem predicate directly and
the selector only with an unreadable directory, so a selector that took
syncfs after any successful Statfs passed. A test hook now rewrites the
filesystem type a successful Statfs reports; an import into a readable
directory reported as overlay must sync each file, and its ext4 twin
must issue one syncfs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: report import durability for the node and placement store directories

Startup probed the lifecycle root, but the node and placement imports
select syncfs from their own nodes/ and placements/ directories, so a
subdirectory on a separate mount could report one path and use the
other. Each store now reports the mode its import selects, startup
prints both, and nothing is printed without a lifecycle store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: list the syncfs selector and per-store mode tests in the ledger

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: pingqiu <pingqiu@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-05 12:25:46 -08:00
..