Commit Graph
4919 Commits
Author SHA1 Message Date
pingqiu 7db6a75e65 Merge main into the finalize change 2026-12-02 08:27:11 -08:00
Ping Qiu eb17287328 Merge pull request #937 from seaweedfs/feature/905-wal-pressure-hold
fix: hold WAL writes while reclaim progresses and preserve command FIFO
2026-12-02 08:24:05 -08:00
pingqiu ed1aa53d55 Merge main into the finalize change: #956's retire answers
# Conflicts:
#	cmd/sw-block/cluster_format.go
#	core/lifecycle/node_inventory.go
2026-12-02 08:01:21 -08:00
pingqiu 39f9f1878b test: use a fixed clock for legacy iSCSI budget 2026-12-02 07:57:59 -08:00
pingqiuandClaude Opus 5.5 b0d7574ba6 master: the fail-closed control re-sends node-a's heartbeat after writes recover
node-a's level write failed during the window too, so it stayed unkept and
the final finalize rightly refused it; its next heartbeat now keeps it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:54:59 -08:00
Ping Qiu 6204b88608 Merge pull request #956 from seaweedfs/feat/retire-preview-typed
sw-block: retire-host answers 0/2/75/1 with --json; a forced move's preview carries the typed reason
2026-12-02 07:53:56 -08:00
pingqiu 9f3afc3c71 test: bound WAL reservation witness and cleanup 2026-12-02 07:48:36 -08:00
pingqiuandClaude Opus 5.5 8948c4a69a master: the ordering control holds only its first keeper, without blocking later ones
sync.Once blocked the second keeper inside the hook too, so a missing keep
lock could still pass; the first caller is now taken with a compare-and-swap
and later ones pass straight through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:36:27 -08:00
pingqiuandClaude Opus 5.5 a13f2d6fdf sw-block, master: a failed --json answer fails the command; a retire's storage failure is Internal
Review fixes. When the --json answer cannot be written, retire-host and
finalize-format exit 1 instead of 0. A retire whose record removal failed
answers Internal (the CLI's failed, exit 1), not FailedPrecondition (refused,
exit 2); the node store's test hook can fail a removal for the control.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:31:45 -08:00
pingqiuandClaude Opus 5.5 a56090ddcc master: the ordering control discriminates the keep lock; the fail-closed control proves ingest and log
Test-only review fixes. The ordering barrier now sits after the level is
settled and before the node store's own lock, so a keeper without the keep
lock fails it; every exit opens the barrier and joins the keepers. While
record writes fail, a heartbeat's new slot is shown ingested and the failure
logged. The v1.1 note says an idle host is judged by its last recorded level
after a master restart, until its next heartbeat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:29:33 -08:00
pingqiuandClaude Opus 5.5 b9d3606a39 master: the fail-closed control clears node-b's earlier level-0 entry first
Its next report must be a change for the failed write to be attempted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:16:00 -08:00
pingqiuandClaude Opus 5.5 5b78afdf42 master: a failed read-level write never refuses a heartbeat
The heartbeat is ingested first, then the host's read level is written to
its node record. A failed write is logged, marks the host unkept (status
read_level_not_kept, the finalize refuses it by name) and is retried by the
next heartbeat; heartbeats and lease renewals go on meanwhile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:10:01 -08:00
pingqiuandClaude Opus 5.5 afea634234 lifecycle: a failed ReadsLevel write is repaired by the next one; no aliased levels
A write that fails after its rename can leave another level in the file
while the in-memory record keeps the old one; the store now marks the
record unsure, so the next write is never skipped as unchanged. RegisterNode
copies its input and its answer, so no caller shares the stored level. The
master's ordering control waits on an explicit barrier in the write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:07:44 -08:00
pingqiu 4488a94dd5 test: pin WAL hold silence and reservation continuity 2026-12-02 07:07:34 -08:00
Ping Qiu 24fa0b776b Merge pull request #954 from seaweedfs/test/windows-locked-reads
storage: test: three tests read a locked store file through the store
2026-12-02 07:05:42 -08:00
pingqiuandClaude Opus 5.5 59a0ebca91 sw-block: retire-host answers 0/2/75/1 with --json; a forced move's preview carries the typed reason
retire-host follows finalize-format's contract: exit 0 retired, 2 refused,
75 the master could not be reached, 1 any other failure or usage error, and
--json prints result, reason, server, volumes and message for every outcome.
The master's HOST_HOLDS_WORK refusal names each held volume in its typed
metadata. The forced-move preview answers the typed reason the move itself
would carry (reason_code, e.g. BINARY_TOO_OLD), and force-move --dry-run
--json shows it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:04:38 -08:00
pingqiuandClaude Opus 5.5 df5f5dde77 master: keep a host's last read level in order and fail closed
Review fixes. The level is settled and written under one lock, so of two
heartbeats the later level is the one left on the node record. A failed
write refuses the heartbeat (the host sends it again) and marks the host,
which the finalize refuses until a later write succeeds. The node record's
level is deep-copied at the store's boundaries. Controls: 1-then-0 and
0-then-1 across expiry and restart, the held-write order, the failed write;
the issued-line fixture uses a workspace move, and the retire test reports
the volume its host holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:59:55 -08:00
Ping Qiu b77089cb2f Merge pull request #951 from seaweedfs/test/slow-extent-budget
storage: test: the slow-extent red tolerates a slow fsync
2026-12-02 06:52:27 -08:00
pingqiuandClaude Opus 5.5 33041f5ec0 master: an idle host is judged by its last reported level, kept with its node record
An idle host (no placement, no lease) is judged by the level it last
reported, kept in memory and on its node record across restarts: 1 passes,
0 blocks, a host that never reported does not count. A re-registration at
start keeps the level. Hosts that hold work still need live reports per
volume. Two tests now expect the served volume's own diagnostic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:40:06 -08:00
pingqiuandClaude Opus 5.5 0dbe9b9191 storage: test: three tests read a locked store file through the store
Three tests read or damaged the store file through a second handle while
the store held its byte-range lock: mandatory on Windows, so they failed
there only. They now go through the open store's own file: the slots by
slotsV3Of, a record by damageOpenRecord. What they assert is unchanged.

Fixes #953.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:39:03 -08:00
pingqiu ede1e4d3b0 perf: reserve uncontended WAL appends without a queue ticket 2026-12-02 06:34:21 -08:00
pingqiuandClaude Opus 5.5 fe0f02b68e master: the finalize judges per process and keeps every host that ever reported
Review fixes. A host that reported counts even after its reports leave the
freshness window (then, with no live report and no work, it is unknown and
refuses). Each volume a counted host serves needs its own live report at
the level, so one unreported process refuses, naming its volume; work held
only as an issued line counts the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:28:49 -08:00
Ping Qiu 14016ef705 Merge pull request #948 from seaweedfs/fix/b1-candidate-followups-2
storage: touched-set bookkeeping: attach allocation, drained pause, status
2026-12-02 06:24:50 -08:00
pingqiu ea15eb8f37 test: pin WAL hold timing and reordered append controls 2026-12-02 06:21:20 -08:00
pingqiu c88b152f98 Merge remote-tracking branch 'origin/main' into feature/905-wal-pressure-hold 2026-12-02 06:14:41 -08:00
pingqiuandClaude Opus 5.5 4fe9ba2478 master: the format finalize counts only hosts that hold work or have reported
With one process per volume, a registered spare host never reports, so the
finalize could only pass after retiring every spare host. It now counts
every host that holds a placement, a lease or an assignment, and every host
that has reported a read level; an idle host with neither does not block it.
If such a host later runs an old binary, the grant gate refuses it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 06:14:14 -08:00
pingqiu 7f1468973d docs: preserve UTF-8 in transport contract edits 2026-12-02 06:12:42 -08:00
pingqiu f43a47105a fix: keep device write budget out of FUA sync 2026-12-02 06:11:47 -08:00
Ping Qiu 127e25722d Merge pull request #945 from seaweedfs/feat/master-grant-wait-status
master: a late grant on an unreported host degrades the status, naming the volume
2026-12-02 06:07:52 -08:00
Ping Qiu 70e99438e9 Merge pull request #950 from seaweedfs/feat/v8-producer-reserved
Reserve bounded producer list cursors in HEAD version 1
2026-12-02 06:03:41 -08:00
pingqiuandClaude Opus 5.5 4c4e753b61 storage: test: the slow-extent red tolerates a slow fsync
TestWALStoreV3SlowExtentKeepsReclaimMoving flaked on a busy Windows
host: a single slow fsync pushed one bounded cycle past its 500 ms
admission budget (attempts of 500-577 ms, against cycles whose writes
take about 77 ms). The slow disk is now 5 ms per extent write and the
budget half a whole-map cycle from the measured sleep (about 1.2 s): a
bounded cycle (about 160 ms of writes) leaves room for a slow fsync,
and a whole-map cycle (about 2.4 s) still outlasts the budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 05:51:03 -08:00
pingqiu 2f9a4cc689 perf: share WAL command arrival state with its hold 2026-12-02 05:50:25 -08:00
pingqiu c652a6a2f7 perf: notify only the next WAL admission waiter 2026-12-02 05:46:31 -08:00
pingqiuandClaude Opus 5.5 ce48465298 storage: #948 tests: bounded close, exact union, exact pause deltas
The direct-attach test bounds its Close as mustAttach does. The status
test pins the exact union of live and in-flight candidates during an
upload (distinct and overlapping) and the in-flight part leaving after
HEAD installs. The drained-pause test pins exact deltas: 2k for k dirty
chunks, 2N for a whole-volume pass, and nothing carried over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 05:46:27 -08:00
pingqiuandClaude Opus 5.5 492a56f279 master: the held-old/new snapshot control holds only the older snapshot
A non-blocking one-shot guard holds snapshot A alone (B passes the hook
without blocking, so a read outside the lock lets B finish during A's
hold), the newer wait's first-seen time is pinned to B's, and A's
completion and B's join are bounded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 05:45:02 -08:00
pingqiu 18ffa85a40 Regenerate status schema for the pending-work skip reason 2026-12-02 05:40:59 -08:00
pingqiuandClaude Opus 5.5 0e433ad908 master: a status snapshot reads its placements under the grant-wait lock
The waiting set's placements are read inside the lock that reconciles
it, so a snapshot that read older placements can never reconcile after
a newer one and drop the wait it started. A held-old/new control pins
it. host.go is rewritten without the carriage returns the previous
commit added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 05:37:28 -08:00
pingqiuandClaude Opus 5.5 d16bd533d5 master: one status snapshot reconciles the grant waits at a time
The waiting set and its first-seen times are computed and reconciled
under one lock, so a concurrent snapshot never drops an entry another
just started (its wait would restart).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 05:28:21 -08:00
pingqiuandClaude Opus 5.5 9f5988d03f master: grant waits as one reconciled set per server and volume
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 05:25:49 -08:00
pingqiuandClaude Opus 5.5 fbcf09fcb9 master: a late grant on an unreported host is a warning naming the volume (r2.877)
An idle unreported host stays info. A host holding a placed volume that
has waited for its grant past the startup window (the freshness window,
from when this master first saw it waiting) is a warning naming each
such volume and its wait.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 05:25:49 -08:00
Ping Qiu b6ccca62f9 Merge pull request #942 from seaweedfs/feat/master-format-level-read
master: read-only format level, a new cluster starts at level 1
2026-12-02 05:24:46 -08:00
pingqiu 9a4fc847a6 Report newer pending work when list retirement is skipped 2026-12-02 05:20:35 -08:00
pingqiu 7bd43c8604 fix: retain command arrival priority between WAL batches 2026-12-02 05:17:35 -08:00
Ping Qiu 641affc88c Merge pull request #949 from seaweedfs/fix/create-recover-progress
storage: a new store's own recovery reports its fence through the create options
2026-12-02 05:17:10 -08:00
pingqiu 4c90321088 Reserve bounded producer list cursors in the v1.1 HEAD format 2026-12-02 05:06:28 -08:00
pingqiu 22e75f5bfa fix: scope FIFO admission to store appends 2026-12-02 05:06:15 -08:00
pingqiuandClaude Opus 5.5 ee55f6b1a8 storage: a new store's own recovery reports its fence through the create options
createWALStoreV3Configured recovered the new store with a background
context, so the fence of that recovery reported no progress although the
provider passes RecoveryProgress on create; on a slow disk the startup
window could end inside it. It now recovers with the options' observer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 04:54:59 -08:00
pingqiuandClaude Opus 5.5 0de6ed79e7 master: the lease refusal kinds test measures the level-0 barrier on an upgraded cluster
TestLeaseRefusalKinds measures v1.0's barrier (65 s after the grant) and
assumed a fresh master is at format level 0; a new cluster now starts at
level 1, whose barrier is the lease deadline plus the skew (50 s). The
test runs on an existing (upgraded, not finalized) cluster's store and
asserts level 0 before the BARRIER case; the level-1 barrier stays
covered by TestTheForcedBarrierFollowsTheFormatLevel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 04:52:16 -08:00
pingqiu 5365a2d106 fix: keep final-error device writes outside retryable WAL holds 2026-12-02 04:52:08 -08:00
pingqiuandClaude Opus 5.5 7cd5240aea storage: touched-set bookkeeping: attach allocation, drained pause, status
Three accounting fixes for the touched-set candidates, each with a red:
the live touched set is allocated before the layer's hooks are published
(a v1.1 store's first map entry change otherwise allocated the bitmap
under the store's lock); a drained pre-copy cut charges its dirty-set
and whole-volume walks to the pause (they ran inside it, uncounted); and
the status's dirty count includes a cut's judged candidates until its
HEAD installs. The unknown-commit-outcome test now compares the remote
image byte for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 04:41:29 -08:00