Commit Graph
3011 Commits
Author SHA1 Message Date
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
pingqiuandClaude Opus 5.5 e04a353af6 test(blockvolume): a long blockmaster outage under real systemd with the shipped start limit
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:28:42 -08:00
Ping Qiu 5d0181e39c Merge pull request #526 from seaweedfs/test/phase0-master-baseline
test: phase 0 baseline: blockmaster restart and 60 s outage under guest writes
2026-11-23 17:28:18 -08:00
Ping Qiu 8484f1ec0e Merge pull request #522 from seaweedfs/fix/geometry-unreadable-record
fix(blockvolume): a volume record not read in create mode is refused before any store exists
2026-11-23 17:27:37 -08:00
Ping Qiu 3ee00ee1ec Merge pull request #524 from seaweedfs/test/head-size-runner
test(blockvolume): HEADSZ runs its snapshots past the shared 150 s bound
2026-11-23 17:09:35 -08:00
pingqiuandClaude Opus 5.5 e9f01cbaf2 test(blockvolume): phase 0 baseline: what losing blockmaster costs the guests today
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:05:36 -08:00
pingqiuandClaude Opus 5.5 162f914a31 test(blockvolume): the systemd test removes only the lock directories it created
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:03:03 -08:00
pingqiuandClaude Fable 5.1 c0fce8dc11 test(blockvolume): HEADSZ records each attempt's candidates and payload
TEST V1-SPEC r2.100: after every cut attempt HEADSZ records the volume's
DirtyChunks (capture candidates) and its last successful cut's
CandidateChunks, UnchangedChunks and PayloadNs, as the durable status
reports them, so the candidate count and its cost are measured per size.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-23 17:01:53 -08:00
pingqiuandClaude Fable 5.1 0c44cbc29a test(blockvolume): HEADSZ runs its snapshots past the shared 150 s bound
TEST V1-SPEC r2.99/r2.100: the shared sw-block runner kills a command after
150 s, so a cut longer than that never reached the server's own operation
deadline. HEADSZ now runs the snapshot command with its own bound, the
command's --timeout plus a minute, and records a command it still has to
kill as an attempt. It also records the volume's DirtyChunks (its capture
candidates) before the first cut.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-23 16:59:53 -08:00
pingqiuandClaude Opus 5.5 32fb4b78fe test(blockvolume): the systemd outage test uses the real lock directory and the unit's failed state after its burst
Under systemd blockvolume refuses --volume-lock-dir-test-only (exit 2), so
the first run never reached the filer check. systemd 249 reports the start
limit as a failed unit with Result=exit-code and 'Start request repeated
too quickly', not Result=start-limit-hit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:54:19 -08:00
Ping Qiu 7ec838451a Merge pull request #523 from seaweedfs/test/head-size-timeout
test(blockvolume): HEADSZ snapshot timeout and retried cuts
2026-11-23 16:53:17 -08:00
pingqiuandClaude Opus 5.5 6516a950ff review fold: the create-mode geometry check in M1 (diagram and row); the systemd test needs GAP1_SYSTEMD_AUTHORIZED=1 and root
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:51:21 -08:00
pingqiuandClaude Fable 5.1 cf667f633c test(blockvolume): HEADSZ snapshot timeout and retried cuts
TEST V1-SPEC r2.99: HEADSZ_SNAPSHOT_TIMEOUT passes the snapshot command's
--timeout (the server caps it at its operation deadline); HEADSZ_ATTEMPTS
retries a failed cut with the same request id. Every attempt is recorded
with its error, wall time, the volume's last cut and its chunk-key count in
the filer afterwards, so a retry shows whether an earlier attempt's uploads
were kept. A cut that never completes is recorded as cut_not_completed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-23 16:45:05 -08:00
pingqiuandClaude Opus 5.5 880a8ba6f6 test(blockvolume): the guide's reset-failed procedure after a filer outage, under real systemd
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:44:38 -08:00
pingqiuandClaude Opus 5.5 3bd8e3302d fix(blockvolume): a volume record not read in create mode is refused before any store exists
INV-VOL-GEOMETRY-FLAGS-RECORD-001: in create mode a ReadVolume error was
taken as an absent record, so a wrong --durable-blocks could still create a
wrong-size store when the record could not be read. The error is now
classified (one type check): the filer failed the read (remote unavailable,
deadline) -> exit 75, retried: 'the volume record of V could not be read
(<cause>); no local store was created; retrying'; the record is there but
does not decode -> exit 78, not a retry loop: 'the volume record of V is
unreadable (corrupt: <cause>); no local store was created; restore or
recreate the record'. An absent record (not found) keeps the create path.
A first start with the filer down was already safe: it ends at the startup
filer check (exit 1) before this one.

Tests: unit, both classes (a failing LookupEntry -> 75 for a wrong and a
right flag, the record read; a corrupt VOLUME entry -> 78);
TestCorruptRecordIsRefusedBeforeTheStoreIsCreated (filer up, the VOLUME
entry undecodable: 78 and no store for both flags; restored: 78 for the
wrong flag, the right flag serves); TestFirstStartWithTheFilerDownCreatesNoStore
(guard). The ledger row and the operator guide say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:38:57 -08:00
Ping Qiu dd504042c4 Merge pull request #521 from seaweedfs/test/head-size-measure
test(blockvolume): measure HEAD size against volume size (informative)
2026-11-23 16:36:59 -08:00
Ping Qiu f286115298 Merge pull request #519 from seaweedfs/test/1.0.1-geometry-flag-vs-record
fix(blockvolume): refuse geometry flags that disagree with the volume record before creating a store
2026-11-23 16:24:52 -08:00
pingqiuandClaude Fable 5.1 68a5fde109 test(blockvolume): measure HEAD size against volume size (informative)
IMPL V1-SPEC r2.94: an env-gated integration test (HEADSZ_RUN=1) that writes
one 4 KiB block in every 1 GiB segment of a volume per size in HEADSZ_SIZES,
takes a snapshot, then snapshots after one changed block each, and reports
per cut the HEAD entry's byte size from the filer, the segments it lists, the
cut's timings and the bytes it uploaded. A size the durable root cannot hold
is recorded as refused by the headroom check. No assertion on the numbers.

The weed cluster helper gains a sized variant; existing callers keep the
same 32 x 256 MB volume server.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-23 16:22:34 -08:00
pingqiuandClaude Opus 5.5 9931e95525 docs(invariants): the header row count includes INV-VOL-GEOMETRY-FLAGS-RECORD-001
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:18:07 -08:00
pingqiuandClaude Opus 5.5 409f706f31 test(blockvolume): review fold: a real unreadable-record read, the cure's exact attach refusal, the invariant under 300 characters
The unreadable-record control reads a valid volume through a filer whose
lookups fail and asserts the read happened. The cure test's right-flag
start on the planted store must exit 75 with the attach check's
geometry_mismatch and never log a frontend phase over its life. The
ledger statement keeps its meaning in 288 characters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 16:02:35 -08:00
pingqiuandClaude Opus 5.5 f1227debce fix(blockvolume): refuse geometry flags that disagree with the volume record before creating a store
INV-VOL-GEOMETRY-FLAGS-RECORD-001. A create-mode start whose
--durable-blocks/--durable-blocksize disagree with the volume record exits 78
(no restart) with a line naming both geometries, before the durable provider
is built, so no local store of the wrong size is created. An existing local
store is never rechecked against the flags (its geometry is checked at
attach, as before); a missing record keeps the create path; an unreadable
record falls through to the attach check.

Tests: TestGeometryFlagsRefusalComparesTheRecord (unit);
TestWrongGeometryFlagIsRefusedBeforeTheStoreIsCreated (real binaries, red on
the previous main: exit 75 after 35 s and a wrong-size store). The cure for a
store an earlier release left stays: TestWrongGeometryCureAsWritten plants
that store from a readable text fixture of a 2129a736 capture (sha256 checked
per file); the operator guide scopes the cure to such a store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 15:51:02 -08:00
Ping Qiu 9fd29e31c7 Merge pull request #517 from seaweedfs/docs/snapshot-slot-wait
docs: operator guide: a snapshot may wait up to 15 s for a slot at 32 volumes (3 slots)
2026-11-23 14:14:15 -08:00
pingqiuandClaude Opus 5.5 1cbbc213ec docs: operator guide: how long a snapshot may wait for a host slot with many volumes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 14:04:21 -08:00
Ping Qiu 1bb1d0f46e Merge pull request #516 from seaweedfs/docs/snapshot-slot-refusal
docs: operator guide: retry a snapshot refused for a busy host slot with the same request id
2026-11-23 14:02:04 -08:00
pingqiuandClaude Opus 5.5 924f933873 docs: operator guide: a snapshot refused for a busy host slot is retried with the same request id
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 13:52:55 -08:00
Ping Qiu 4a8a4e9ef1 Merge pull request #515 from seaweedfs/test/f1-retry-slot-refusal
test: F1 resends a snapshot refused for a busy host slot (bounded, same request id)
2026-11-23 13:35:27 -08:00
pingqiuandClaude Opus 5.5 ceca03943d test(blockvolume): F1's not-admitted failure carries the whole refusal body
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 13:24:42 -08:00
pingqiuandClaude Opus 5.5 f4f4d0da91 test(blockvolume): F1_SLOT_RETRY_SECONDS accepts 0 (the negative control)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 13:22:06 -08:00
pingqiuandClaude Opus 5.5 58c5b68294 test(blockvolume): F1 retry bound = the snapshot command's deadline; not admitted fails; not_run restore rows
The retry bound is the snapshot command's 60 s operation bound
(F1_SLOT_RETRY_SECONDS, 0 = no retry, the negative control). A snapshot
still refused at the bound fails the rung as not admitted; restore_exact
reads "not_run" for it, never false. The slot wait is reported and the
write window starts at the admitted attempt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 13:16:41 -08:00
pingqiuandClaude Opus 5.5 09346d4de9 test(blockvolume): F1 resends a snapshot refused for a busy host slot
N volumes snapshot at the same instant against fewer host slots; the slot
refusals (host_slot_busy, capture_refused from the host limiter) are
retryable by contract. F1 now resends them with the same request id every
250 ms for up to 120 s, records the count per round, and keeps the wait in
the request-to-commit time the starvation bound checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 13:10:59 -08:00
Ping Qiu c7862d7b2c Merge pull request #514 from seaweedfs/test/harness-run-log
test: the procedure harness logs every sw-block command's argv, exit status and output
2026-11-23 12:53:55 -08:00
Ping Qiu cd71058f8c Merge pull request #513 from seaweedfs/test/harness-volume-helpers
test: harness parsers take the volume; pattern() refuses a partial block
2026-11-23 12:53:34 -08:00
pingqiuandClaude Opus 5.5 3f7c1e40d6 test(blockvolume): the command log stops at the test's end
A runCLI goroutine that outlives its test would make t.Logf panic; a done
flag set in t.Cleanup turns logCommand into a no-op from then on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 12:42:17 -08:00
pingqiuandClaude Opus 5.5 e60f642d81 test: gofmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 12:40:49 -08:00
pingqiuandClaude Opus 5.5 2948987d84 test: harness parsers take the volume; pattern() refuses a string that does not divide a block
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 12:40:31 -08:00
pingqiuandClaude Opus 5.5 320fbc8411 test(blockvolume): the procedure harness logs every sw-block command
h.run and runCLI write each command's argv, exit status and output (each
stream capped at 4 KiB) to the test log, so a refusal is visible without a
rerun.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 12:40:02 -08:00
Ping Qiu 68b3436162 Merge pull request #512 from seaweedfs/docs/wrong-geometry-cure
docs: operator guide: the cure for a start with the wrong --durable-blocks, guard first
2026-11-23 12:31:09 -08:00
Ping Qiu f530996b04 Merge pull request #511 from seaweedfs/test/wrong-geometry-cure
test: the wrong --durable-blocks cure run as written, guard first
2026-11-23 12:19:27 -08:00
pingqiuandClaude Opus 5.5 8877cc6d3e docs: scope the wrong-geometry cure to a volume's first start
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 12:14:22 -08:00
pingqiuandClaude Opus 5.5 bf44e7bbf9 test(blockvolume): the cure's order: stop first, then the guard
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 12:11:14 -08:00
pingqiuandClaude Opus 5.5 d565e7e140 docs: stop first, then the guard, then remove; name the message; what the guard does not cover
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 12:11:10 -08:00
pingqiuandClaude Opus 5.5 dea5e6a6dc docs: operator guide: the cure for a start with the wrong --durable-blocks, guard first
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 12:10:37 -08:00
pingqiuandClaude Opus 5.5 ff124a5a75 test(blockvolume): the wrong --durable-blocks cure run as written, guard first
A blockvolume started with half the spec's --durable-blocks creates its
local store at that size, never claims HEAD and exits 75; a right-flag
start then fails on geometry_mismatch. The test checks the guard (ops chunk
show: epoch 0, no holder), removes the four local files, starts with the
right flags and serves; the guard then reads as claimed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 12:09:55 -08:00
Ping Qiu 1c0b9ac976 Merge pull request #510 from seaweedfs/test/f1-writer-deadline
test: F1 load writer renews its NVMe/TCP deadline per write; a round with no write in the cut fails
2026-11-23 11:40:03 -08:00
pingqiuandClaude Opus 5.5 52f6085590 test(blockvolume): F1 fails a round in which no load write met the cut
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 11:30:32 -08:00