Commit Graph
5000 Commits
Author SHA1 Message Date
Ping Qiu 8145e4decf Merge pull request #959 from seaweedfs/feat/presync-until-short
storage: the pre-barrier sync repeats until its tail is bounded
2026-12-02 12:37:58 -08:00
Ping Qiu f7b99da650 Merge pull request #961 from seaweedfs/docs/model-code-trace-four-models
trace: map FormatGate, RecoveryProgress and the WALHold queue path to code
2026-12-02 11:54:01 -08:00
pingqiuandClaude Opus 5.5 260aeffda1 storage: #959 gate test joins both workers before the store closes
The cleanup keeps both worker handles in scope: it ends the admitted
write and releases the hold, then joins the hold worker and, if started,
the held extent-write worker, each bounded with a reported timeout, and
closes stop only after the joins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 11:52:26 -08:00
pingqiuandClaude Opus 5.5 419f2b65b5 storage: #959 tests: contested arrival, a busy-barrier witness, a failed held sync
The gate test runs in a bounded child, sees each side reach the contested
boundary (the hold pending on the gate, the new extent write counted as
waiting) before asserting, and releases and joins on every exit. A new red
holds a capture reader without WAL pressure: the barrier must give the
hold up while that reader is still held and report barrier_busy. A new
control fails the held last pass's own sync (a test-only fault seam) and
requires that error, a released hold and extent draining again; the
cancellation control stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 11:43:00 -08:00
pingqiuandClaude Opus 5.5 e0be768983 volume: the /chunk/cut body mirrors the pre-barrier tail stats
PreSyncRounds, TailBytes, TailOverBound and TailCause join the cut body,
which mirrors the storage cut stats field for field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 11:16:59 -08:00
pingqiuandClaude Opus 5.5 f3a8ef4335 storage: the cut's extent hold never stalls a guest write
A guest write waiting at the WAL hard mark holds the capture lock's read
side while it waits for the flusher, and the cut's hold stopped the
flusher until after the barrier took that lock: the write failed at its
admission budget. The barrier now only tries for its lock while the hold
is on (5 ms); at the hard mark, or when the try fails, it releases the
hold first and takes the lock normally, and the cut reports TailOverBound
with TailCause. Before the barrier a held extent write also goes through
while a writer waits at the hard mark.

The hold is now a read/write gate around each extent write and its
count: holdExtentWrites returns only after admitted writes have landed,
so the last pass's baseline misses none. A cut whose context ended in an
unheld pass returns before taking the hold.

Tests: two hard-mark reds and a failed-cut release test in bounded
children, a gate test, bounded writer joins, a deterministic unreachable
bound, and proof that a flusher cycle reached the held pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 10:56:52 -08:00
pingqiuandClaude Opus 5.5 f202bbe5c4 trace: map FormatGate, RecoveryProgress and the WALHold queue path to code
The model-code trace named only WALHold's fast path and SnapDelete.Send
of the models the next release projects. Add the file and action rows for
FormatGate (finalize, grant, heartbeat level, retire), RecoveryProgress
(fence and replay progress, the stall window) and the WALHold admission
queue (arrive, re-enter, resubmit). Docs only; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 10:55:41 -08:00
Ping Qiu f0719b64b4 Merge pull request #952 from seaweedfs/fix/finalize-idle-hosts
master: the format finalize blocks only on an old holder and lists the other hosts
2026-12-02 10:40:34 -08:00
pingqiuandClaude Opus 5.5 c525b5f40b storage: hold flusher extent writes over the last pre-barrier pass
TailBytes now runs from the start of the last pre-barrier pass to the
barrier lock, since the pause flushes all of that. A loaded cut right
after a fill, with the flusher draining, did not converge: a flusher
cycle landing in the last pass left the pause about 4 MiB to flush. The
last pass now runs with new flusher extent writes held until the barrier
is released (one pass and the pause; the cut needs the WAL only up to H),
so the pause flushes the guest's WAL tail alone. The flusher waits
before an extent write, holding no store lock, and stops waiting when it
is stopped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 10:05:47 -08:00
pingqiuandClaude Opus 5.5 a6f01f4aff Status test: a healthy volume shows no binary_too_old; match by volume id
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 10:01:51 -08:00
pingqiuandClaude Opus 5.5 8fe764c039 Show a holder refused by the format gate in the master's status
At format level 1 and above, each server holding a volume whose process
for it reads below the level gets a volume condition (reason
binary_too_old, with the server and its report level): its holder only
sees no assignment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 09:41:56 -08:00
pingqiuandClaude Opus 5.5 3fcd6d00b7 Retrigger CI (no change)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 09:33:52 -08:00
Ping Qiu 6e096b54b4 Merge pull request #874 from seaweedfs/feature/v3-snapshot-operations
V3: durable snapshot operation outcomes (red-first draft)
2026-12-02 09:27:19 -08:00
pingqiuandClaude Opus 5.5 89a764dbdd List a held volume's stale report instead of blocking on it
A held volume whose process has been silent past the freshness window is
listed by the finalize (stale report); the grant and placement checks
still read the kept entry and refuse an old one. The restart test keeps a
sibling process at level 1 so the grant cannot borrow its report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 09:15:24 -08:00
pingqiuandClaude Opus 5.5 44edaa4f0e storage: the pre-barrier sync stops on the tail it leaves, bounded
The pre-barrier sync repeats until the store-file bytes dirtied during
its last pass (WAL appends and extent writes) are at most a named bound
(1 MiB), at most 6 passes and while the cut is live; past the last pass
the cut proceeds and reports the tail above the bound. LastCut reports
PreSyncRounds, TailBytes and TailOverBound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 09:12:38 -08:00
pingqiuandClaude Opus 5.5 a8ddae011f storage: the pre-barrier sync repeats until a round is short
The first loaded cut after a fill paid the fill's write-back in its one
pre-barrier sync, and what the guest wrote meanwhile became the pause's
own sync work, growing with the fill. The pre-barrier sync now repeats
while a round takes longer than 10 ms (above one device flush), at most
6 rounds and while the cut is live: the pause then flushes only about one
short round of writes, whatever the fill. Status reports the rounds
(LastCut.PreSyncRounds).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 08:57:27 -08:00
pingqiuandClaude Opus 5.5 23a20a92aa Pin the restart path the finalize leans on
A holder that restarts on an old binary adopts no line issued for its
dead process, and the re-issue for its new incarnation is refused at the
publication boundary (binary_too_old): the line keeps naming the dead
process. The control restarts on a binary that reads the level and gets
the line re-issued.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 08:54:44 -08:00
pingqiuandClaude Opus 5.5 513d6294a6 ci: re-trigger
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 08:53:49 -08:00
pingqiuandClaude Opus 5.5 5cb92b7593 Cut the finalize down: block only on an old holder, list the other hosts
The finalize is refused only while a live report of a process holding a
volume reads below level 1. A held volume with no report, a host with no
report and an old process holding no volume are listed in the answer
(FinalizeFormatResponse.unconfirmed, and unconfirmed.<id> metadata on a
refusal) and in --json as listed; they do not block. The durable last
level and its marks are dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 08:45:56 -08:00
pingqiuandClaude Opus 5.5 fcf6b0ec41 Merge main (#955) into the snapshot operations
The holder's maintenance now consumes a published delete intent, so a
delete behind an earlier one resumes once its intent is consumed. The
model-code trace keeps both sides' new rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 08:41:21 -08:00
Ping Qiu df6ba7f031 Merge pull request #955 from seaweedfs/feat/v8-delete-consumer
Resume persisted snapshot delete intents through holder maintenance
2026-12-02 08:35:34 -08:00
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 4411f2dc59 docs: the name-delete row names the --gen 0 refusal; the holder resume row states its bound
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:46:28 -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
pingqiu 3cf172045a Mark reachable intent consumption and list retirement in the ledger 2026-12-02 07:14:58 -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
pingqiu bd81736768 Scope the snapshot-delete consumer split and its resweep contract 2026-12-02 07:06:51 -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 7c5f89f560 sw-block: an explicit --gen 0 is refused before admission; the holder resume has its row
--gen 0 names no incarnation and is refused before any read or write,
on a version-0 and a version-1 HEAD alike; it is not the unpinned
delete. INV-SNAP-DELETE-HOLDER-RESUME-001 states and traces the
holder's resume of its own operation behind an unconsumed intent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 07:05:42 -08:00
pingqiu b8bca3382e Pin shared image and object state across queue refusals 2026-12-02 07:04:41 -08:00
pingqiu 7fd40ec621 Bound intent decoding by the fixed candidate shard 2026-12-02 07:04:41 -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
pingqiu def2a78fac Resume persisted delete intents through holder maintenance 2026-12-02 07:04:09 -08:00
pingqiu 7b8aeafbd1 Return typed backpressure for the pending reclamation slot 2026-12-02 07:03:41 -08:00
pingqiu b32c94a8c1 Expose non-flat decoded work in cleaner counting controls 2026-12-02 07:03:41 -08:00
pingqiu 053dc41774 Test two intent consumers settling a refused cursor write 2026-12-02 07:03:41 -08:00
pingqiu ae0af6eed7 Test delete intent work at full manifest geometry 2026-12-02 07:03:41 -08:00
pingqiu eaf456d5e0 feat(chunkstore): resume delete intents and retire abandoned list pages 2026-12-02 07:03:41 -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