Commit Graph
3055 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 fc990eef8a test: the barrier wake is jittered; a final refusal names the exit over superseded; docs
The lifecycle page says how the start waits (no bound while blockmaster
gives no reply, 30 s from the first answer or the barrier), what the new
log lines mean, and what to do on exit 78 reason=moved or reason=deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 23:46:16 -08:00
pingqiuandClaude Opus 5.5 ec8f1ee0f7 test: the fake HEAD follows the holder across moves
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 23:25:16 -08:00
pingqiuandClaude Opus 5.5 c9d4cb0207 fix: poll fast just past the barrier; tests: per-volume watchers, delete via a cut proxy
For 5 s after the master's barrier time the pre-grant poll is 200 ms
(jittered): every lapsed volume re-grants at once, and the ones that find
the publisher busy retry soon instead of a second later (20 volumes:
worst 2.2 s after the barrier with the 1 s poll).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 23:18:01 -08:00
pingqiuandClaude Opus 5.5 1be0e6419c test: 20 volumes serve within 2 s of their barrier after a master restart
Gated by SWB_MANY_VOLUMES=1 (twenty volume processes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 22:46:14 -08:00
pingqiu 61c30f5e73 Merge remote-tracking branch 'origin/main' into fix/master-wait
# Conflicts:
#	docs/design/invariants.md
2026-11-23 22:45:22 -08:00
pingqiuandClaude Opus 5.5 c49134bc00 test: a committed delete during the wait exits 78 deleted; admitted stays 75
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 22:44:59 -08:00
pingqiuandClaude Opus 5.5 f77a75c58e test: a typed moved/deleted refusal gives 78 with its reason; none stays 75
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 22:43:55 -08:00
Ping Qiu 1720cd49cc Merge pull request #525 from seaweedfs/test/1.0.1-first-cut-known-zero-red
fix: 1.0.1 a fresh store's chunks that its claimed HEAD does not name start known-zero
2026-11-23 22:43:17 -08:00
pingqiuandClaude Opus 5.5 e56fe3b9b8 fix: log the master wait's reason from the heartbeat loop; flapping note
The reason line and its 10-minute repeat no longer depend on someone
reading /status. A flapping master postpones the bound and never ends
the wait early: tested and noted under INV-WS-MASTER-WAIT-001.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 22:42:58 -08:00
Ping Qiu 6bc781c6d7 Merge pull request #534 from seaweedfs/test/sync-covers-wal-guard
test: guard that the flusher sync and the WAL sync are one whole-file sync
2026-11-23 22:42:05 -08:00
pingqiuandClaude Opus 5.5 9a303f6ec9 fix: one barrier time, woken past it with jitter; retry from admission's clocks
The guard reads the host's barrier time (one copy) and wakes 100 ms past
it plus up to 500 ms of jitter, capped at 2 min; its 1 s pre-grant poll is
jittered by 20 %. The master's retry_after uses the same two predicates
as admission: lease expiry plus skew (wall) and the grant deadline plus
skew (its monotonic clock), each measured from now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 22:41:57 -08:00
pingqiuandClaude Opus 5.5 a614031c5c fix: MOVED needs a line at a newer epoch than the caller's
A line naming another replica at the caller's epoch or below is OTHER,
not MOVED: a false MOVED is exit 78, which the unit does not restart.
Tests: the decision table, and a move away and back on the real master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 22:41:56 -08:00
pingqiuandClaude Opus 5.5 be75beed90 fix: a typed moved/deleted refusal names the exit; status schema doc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 22:27:32 -08:00
pingqiuandClaude Opus 5.5 45134d4581 test: no fetch and no fill reaches a fresh store before its attach commit
A restore target whose HEAD names two chunks, held at the attach commit
boundary: a frontend read of a HEAD-named block is not served, the remote
serves no chunk read, and after the commit both named chunks are still
absent with no fetch started (no fill wrote the extent); the read then
returns HEAD's data. A shortfall in the fresh attach's certification is
logged as a warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 22:07:05 -08:00
pingqiuandClaude Opus 5.5 76692a5ef7 test: guard that the flusher sync and the WAL sync are one whole-file sync
A source-level test checks that the store opener binds exactly one data
sync for its file and that both the flusher's extent sync and the WAL
sync use it (a range sync, a second descriptor, or a WAL sync that no
longer calls the shared sync fails it). The checkpoint bound over a
superseded synced record rests on this. The crash test helpers also close
the owned-map file of a crashed store, so the crash tests' directory
cleanup no longer fails where an open file cannot be deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 22:02:21 -08:00
pingqiuandClaude Opus 5.5 2d65269fce fix: report how many chunks a fresh attach certified known-zero
ApplyFreshKnownZero now records the count in Stats.KnownZeroChunks and
logs it; when some sampled chunks stay unknown (a failed map publication
or a raced write) the log says the first cut will scan them, so a lab
run that sees a full first scan has the reason in the status and log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:59:08 -08:00
pingqiuandClaude Opus 5.5 520fb10cf4 durable: gofmt the provider handle struct
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:59:08 -08:00
pingqiuandClaude Opus 5.5 9c60d8c247 fix: known-zero needs this start's create; retire the marker before the marking
Two parts of the rule are added. Certification needs the store to have
been created by this process start (an in-memory bit, never persisted):
a fresh marker left by an earlier start, an older binary or another
opener is never trusted, so a first start that dies before its attach
commit pays one scan. And the order is: the attach commit retires the
marker, then the marking is made durable, then the volume serves; a
crash between the first two leaves no marker and every chunk UNKNOWN
(one scan). The user guide states that every explicit implementation
other than walstore-chunk refuses a chunk root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:59:08 -08:00
pingqiuandClaude Opus 5.5 02c153b066 fix: a fresh store's chunks that its claimed HEAD does not name start known-zero
A fresh store (its .chunkfresh marker present at the attach, no BASE) has
never had a write or a fill reach it, so every chunk its claimed HEAD
does not name is zero on both sides. Its attach samples, under the
capture barrier, the token of each such chunk whose owned-map entry is
still the creation value, and clears only their UNKNOWN through the cut's
own map publication, before the attach commit. The first cut of a fresh
volume, hand-over target or restore target then scans only the chunks
written since, not every chunk of the volume. Chunks HEAD names stay
absent and are hydrated from HEAD.

The premise is enforced: every implementation other than walstore-chunk,
explicit as well as auto, refuses a root carrying chunk metadata, so no
plain walstore write can reach a store whose marker says none did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:59:08 -08:00
pingqiuandClaude Opus 5.5 a2441488eb test: red test for a fresh volume's first cut scanning every chunk
A store created empty against a HEAD never claimed, with two chunks
written (one checkpointed out of the WAL), must have two first-cut
candidates and publish both; today all chunks start Unknown and every
chunk of the volume is scanned. Two tests that pass today pin the scope:
a store created against a claimed HEAD, and a restore target, keep every
locally held chunk a candidate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:58:57 -08:00
Ping Qiu 635b9093bb Merge pull request #530 from seaweedfs/test/flusher-unsynced-extent-red
fix: the flusher writes an extent only from a synced WAL record
2026-11-23 21:57:38 -08:00
pingqiuandClaude Opus 5.5 887564ee84 docs: ledger rows for the master wait
INV-WS-MASTER-WAIT-001 (new, ACTIVE), its C.W wait site, and the
startup-wait wording of the M2 exit transition, INV-WS-SERVE-LEASE-HELD-001,
TERM-SERVING-001, TERM-STOP-EXIT-001 and the supervisor retry row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:55:22 -08:00
pingqiuandClaude Opus 5.5 b232d8a342 test: the shipped unit survives a 10-minute master outage
Replaces the measurement of today's give-up (start limit after ~6 min)
with the requirement: one fence restart, never failed, MasterWait
unreachable on /status, serving within 2 s of the master's barrier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:53:56 -08:00
pingqiuandClaude Opus 5.5 a2cf0f8983 test: waiting through a master outage, barrier, stop, moved, obsolete unit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:53:26 -08:00
pingqiuandClaude Opus 5.5 232a74e73e feat: /status MasterWait for a workspace primary without a grant
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:51:12 -08:00
pingqiuandClaude Opus 5.5 d16a30eca4 test: startup wait follows the master contact, the barrier and final refusals
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:50:17 -08:00
pingqiuandClaude Opus 5.5 03b165f058 fix: keep the fixed-timeout evidence text; no leaked wait context
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:49:04 -08:00
pingqiuandClaude Opus 5.5 11f817d6d8 test: a checkpoint over a superseded synced record needs the flusher's sync to cover the WAL
b=X and c=Y synced, then b=Z unsynced: the flusher skips b (its newest
entry is unsynced) and its checkpoint passes X's record, which never
reached the extent. Crash after the checkpoint, with the WAL region as of
the last sync that covered it: b reads Z, because the flusher's sync is
the whole-file fsync of the one descriptor. The control models an
extent-only flusher sync and loses X (b reads the bytes from before X),
showing the checkpoint bound rests on that. INV-WAL-FLUSH-SYNC-COVERS-WAL-001
moves from STUB to ACTIVE with this test; INV-WAL-V3-WRITE-AHEAD-001
states the dependency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:26:42 -08:00
pingqiuandClaude Opus 5.5 9ffae70bf9 fix: a flusher cycle with no synced entry is idle; test the pressure path
The flusher keeps only the snapshot's synced entries before its empty
check, so a cycle over unsynced writes alone writes no extent and makes
no fsync (it fsynced an empty batch before). A new test drives a guest
that never flushes: below the WAL pressure threshold nothing reaches the
extent; past it, the flusher's pressure sync makes the writes durable and
the same cycle writes every block's newest bytes and advances the
checkpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:26:23 -08:00
pingqiuandClaude Opus 5.5 c921de54e0 fix: the flusher writes an extent only from a synced WAL record
Page writeback has no order across offsets of one file, so an extent
written from a WAL record that is not yet durable could survive a power
loss that loses the record: extent bytes no recovered record or map
entry accounts for, under a chunk certified equal to HEAD. The flusher
now skips dirty entries above the synced (acknowledged) WAL frontier;
they stay dirty until a Sync or the pressure sync makes them durable,
and the checkpoint is computed from the written entries only (it was
already clamped to that frontier). Recover and the install log already
fsync their records before raising the frontier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:26:23 -08:00
pingqiuandClaude Opus 5.5 de0dfd0575 test: red test for a crash keeping an extent write whose WAL record was not synced
The flusher writes a dirty block's extent before its WAL record is synced
(below the WAL pressure threshold it does not sync first). The test runs
the real flusher, cuts the power at its fsync (the extent page it wrote
kept, the unsynced WAL record lost, no checkpoint), recovers and
re-attaches: the block reads the lost write's bytes locally while HEAD
holds the chunk without them, and the chunk is not a cut candidate, so
nothing reconciles local and published. Fails on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:26:04 -08:00
pingqiuandClaude Opus 5.5 15f980f638 feat: a workspace primary waits for an unreachable master
The startup authority wait no longer runs out while blockmaster gives no
reply or refuses the node's credentials. Its 30 s bound counts from the
first answered contact, or from the master's barrier time when later;
a typed MOVED or DELETED renewal refusal ends it at once with exit 78.
Before its first grant the lease guard sleeps until the barrier time
instead of polling every second.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:22:43 -08:00
pingqiuandClaude Opus 5.5 c8e9f4dde2 test: MOVED as a newer epoch on another host
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 21:04:43 -08:00
pingqiuandClaude Opus 5.5 4d9f242640 feat: typed kind on lease renewal refusals
RenewWorkspaceLease refusals carry a WorkspaceLeaseRefusal status detail
(code and text unchanged): BARRIER with the time left until the
forced-move barrier passes, MOVED only when the published line names
another replica or a newer epoch owned by another known server, DELETED
only for a committed deletion. Everything else carries none (OTHER).
The barrier comes from a typed error, never from the text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 20:59:55 -08:00
pingqiuandClaude Opus 5.5 630451644f fix: cap the blockmaster link's reconnect back-off at 2 s
A volume process will wait through a master outage on one channel, so
gRPC's default back-off (to 120 s) would delay the first call after the
master returns by up to two minutes. Only the two blockmaster dials
change; MinConnectTimeout stays 5 s for the handshake.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 20:45:57 -08:00
Ping Qiu c8bcbc7c21 Merge pull request #532 from seaweedfs/docs/template-source-retirement
docs: qualify template source retirement with a dedicated holder
2026-11-23 20:37:12 -08:00
pingqiuandClaude Opus 5.5 48b4a36bfe test: master link must reconnect within 2 s after a long outage (red)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 20:26:53 -08:00
Ping Qiu 4ce7ebbbfe Merge pull request #531 from seaweedfs/test/flat-head-invariant
docs: state flat image references and shared-space retention
2026-11-23 20:26:07 -08:00
pingqiuandCodex b10708fa8e docs: qualify the template source retirement procedure
Co-Authored-By: Codex <noreply@openai.com>
2026-11-23 20:05:32 -08:00
pingqiuandCodex ca7819fab2 docs: separate the template retirement procedure for review
Co-Authored-By: Codex <noreply@openai.com>
2026-11-23 20:04:58 -08:00
pingqiuandCodex 7ea9b7ab02 test: bound template verification in the procedure and guide
Co-Authored-By: Codex <noreply@openai.com>
2026-11-23 20:01:10 -08:00
pingqiuandCodex a7bac0b2ae test: use an exact block pattern in the retirement procedure
Co-Authored-By: Codex <noreply@openai.com>
2026-11-23 19:59:19 -08:00
pingqiuandCodex 6a4420983c test: prove flat grandchild reads and template source retirement
Co-Authored-By: Codex <noreply@openai.com>
2026-11-23 19:59:06 -08:00
pingqiuandCodex dfe64e1658 docs: state flat image references and shared-space retention
Co-Authored-By: Codex <noreply@openai.com>
2026-11-23 19:52:57 -08:00
Ping Qiu 7892b305b7 Merge pull request #529 from seaweedfs/fix/cut-stats-staging
fix: a cut's payload time counts staging; the layer counts staged chunks
2026-11-23 18:39:05 -08:00
pingqiuandClaude Opus 5.5 f437a52ef7 fix: count each staged chunk as it finishes; ledger row for the stage counters
StagedChunks is counted when staging remembers a chunk for reuse, so a
round interrupted partway counts what it finished instead of nothing;
the copy window, which shares the upload stream, does not count. The
counter's contract (only grows, a re-staged chunk counts again,
in-process) is stated in the status and in a new invariant row with its
tests: an exact count of 6 for a failed attempt, 0 for its reusing retry,
and 5 of 6 for a round whose upload fails at the sixth chunk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:24:14 -08:00
pingqiuandClaude Opus 5.5 6d00eb63b4 fix: a cut's payload time counts staging; the layer counts staged chunks
A cut's PayloadNs now counts its staging rounds even when they uploaded
nothing (every staged chunk was zero), so a first cut that spent its time
reading and hashing shows it. The layer status gains StagedChunks: the
chunks staged by every cut attempt, failed ones included, so a cut retried
after its deadline shows the progress its earlier attempts made.
DirtyChunks is documented as the next cut's candidates, not its progress.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:08:11 -08:00
Ping Qiu 1c4870dd65 Merge pull request #528 from seaweedfs/test/head-size-rawstatus
test(blockvolume): HEADSZ keeps each attempt's whole chunk status
2026-11-23 17:51:19 -08:00
Ping Qiu f3ec4a8afe Merge pull request #527 from seaweedfs/test/systemd-master-outage-start-limit
test: a long blockmaster outage under real systemd trips the shipped start limit; reset-failed + start serves
2026-11-23 17:50:50 -08:00
pingqiuandClaude Fable 5.1 640f582389 test(blockvolume): HEADSZ keeps each attempt's whole chunk status
TEST V1-SPEC r2.104: after every cut attempt HEADSZ stores the volume's
whole chunk section of its durable status as served (every counter and the
full LastCut), so a term the named fields do not cover can still be read.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-23 17:30:41 -08:00