Commit Graph
4753 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 eec85d11ec storage: tests bound their drains and fail real fence slices
The held-drain controls run the drain loop on the test goroutine with a
cycle bound, and the leader-wait control joins its worker before the
store's cleanup on every path. The fence's slices are checked at their
fsync (the counter holds only the completed slices there), and a second
slice's zero write or fsync fails through test seams: no credit for the
failing slice, no completed fence recorded, the store latched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 01:26:24 -08:00
pingqiuandClaude Opus 5.5 d5c2fbdeae docs: regenerate the status schema for the checkpoint step fields
The status schema's generated block takes its descriptions from the
fields' comments: the checkpoint step fields now carry them, and the
block is regenerated (STATUS_SCHEMA_UPDATE=1) instead of hand-edited.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 01:13:24 -08:00
pingqiuandClaude Opus 5.5 e709950124 storage: the recovery fence zero-fills in 4 MiB slices
The fence stays a zero fill (a punched WAL would make the next lap's
appends allocating writes, each fsync committing metadata); the hole
punch is removed. The fill now runs in 4 MiB slices, each written,
fsynced, and only then counted (FenceZeroed) and reported to
fenceSliceHook, the per-slice recovery-progress hook: a recovery over a
slow disk shows progress every slice and the journal never takes the
whole WAL as one burst. The repeat skip stays: a new volume's second
recovery does not fill again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 00:57:37 -08:00
pingqiuandClaude Opus 5.5 af34018f46 storage: a fence on a store without open v3 state keys no repeat
fenceV3 is also called on a bare store (a test of the restore frontier);
the repeat key needs the descriptor publisher, so without it the fence
runs and records nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 00:34:39 -08:00
pingqiuandClaude Opus 5.5 fcb5f608ac storage: the recovery fence punches holes, and a repeat is skipped
Every recovery zeroed the whole WAL range with pwrites and fsynced it:
the WAL's size in writes on every open, twice on a new volume. On Linux,
with the default sparse allocation, the fence now deallocates the range
(a hole punch, which reads zeros) and then fsyncs; where the filesystem
cannot punch, or off Linux, or on a prezeroed store, it writes zeros as
before. A recovery skips the fence when the same range was fenced and
fsynced in this open by the same writer with no WAL write since (a new
volume's second recovery). The fence's bytes count only after its fsync:
status reports FencePunched, FenceZeroed and FenceSkips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 00:23:43 -08:00
pingqiuandClaude Opus 5.5 43c7f9eb1e docs: the bounded-cycle invariant as one-property rows
The prefix cut, the checkpoint at the highest present LSN with whole-record
reclaim, the one checkpoint-and-retire step, and the flusher pass are
separate ledger rows, each one property.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 23:53:39 -08:00
pingqiuandClaude Opus 5.5 5b486edcd5 storage: one checkpoint step retires every entry below it; time its steps
Setting the store's checkpoint and retiring every dirty entry at or below
it are one function on every path (the owned map's publication and
rollover, the map candidate's, the flusher cycle's own retirement): a
checkpoint that jumps past entries a pass wrote while it was held leaves
none of them dirty, pointing at WAL records the released tail lets the
writer reuse.

The checkpoint's steps are timed where they happen: the hooks, the owned
map's page writes and fsyncs, the waits for the leader role and the store
lock, the descriptor slot writes and fsyncs (the store file), and the
retirement. Status reports the step in progress with its start, and per
step the time, count and bytes written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 23:49:45 -08:00
pingqiuandClaude Opus 5.5 d6bf9aa03a storage: the WAL flusher reclaims in bounded cycles
A flusher cycle drained the whole dirty map before one fsync and one
checkpoint, so on a slow disk no WAL byte was freed until the cycle ended
and a write waiting for space timed out while reclaim was running. A
cycle now takes the LSN prefix of the synced entries that fits in a
sixteenth of the WAL, cut at a record boundary (a native batch's blocks
stay together), and checkpoints at its last LSN; the run loop starts the
next cycle at once while entries remain. A pass position moves each
cycle past the previous batch, so a checkpoint held below a batch does
not repeat it, and it is trusted only within one recovery lifetime. A
full drain runs cycles until its first frontier is drained.

The durable status's checkpoint persistence gains the reclaim counters
(ReclaimedBytes, BoundedCycles, FlusherPhase, CycleStarted,
CycleExtentBytes, LastExtentWrite), and WALStore.ReclaimProgress reads
them without a store lock for a write's hold path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 23:22:57 -08:00
Ping Qiu 2f602b6a11 Merge pull request #930 from seaweedfs/test/f1-port-retry
test: F1's holder ports are drawn below the ephemeral range, and a start that lost its port is retried once (#927)
2026-12-01 22:17:18 -08:00
Ping Qiu 40d6cb45e5 Merge pull request #928 from seaweedfs/ci/c3-nongating
ci: run C3 non-gating on shared runners until #905 is fixed
2026-12-01 22:04:31 -08:00
pingqiuandClaude Opus 5.5 dccff2f073 test: F1 retries only an exact listener-bind EADDRINUSE on the attempt's own drawn address, and keeps the first attempt's log (#927 review)
P1: f1WaitAdopted took any log line containing "address already in use"
as a taken port. It now passes the attempt's four drawn addresses to
bindTakenOn, which accepts only Go's listener error ending a line,
"listen tcp <addr>: bind: address already in use", with <addr> one of
them; a different port or host, a dial, a quoted copy, text after it, udp
or the bare words are not a taken port, so the start fails as before.

P2: the retry starts as blockvolume-<key>-attempt2, so the first attempt's
log is not truncated, and startWithBindRetry returns the first attempt's
error, which the test logs (address and log path) before the retry's
answer.

Red: TestBindTakenOnOnlyThisAttemptsListener fails with the previous
substring rule; TestStartWithBindRetry checks attempt numbers and the
kept first error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:50:37 -08:00
pingqiuandClaude Opus 5.5 de43d48be4 test: a holder's harness-chosen port is drawn below the host's ephemeral range, and a start that lost its port is retried once (#927)
handoffAddress drew from [10000, 20000) whatever the host's ephemeral range;
it now cuts the range at the host's ip_local_port_range low end
(handoffRange), as the weed port pairs already do. F1's holder start
(f1Up) answers errBindTaken when the holder exits before adopting with
"address already in use"; startWithBindRetry then draws the holder's four
ports again and starts it once more (v1, whose ports the cluster spec
names, is not retried). Any other failure, or a second taken port, fails
the test as before.

Red first: TestHandoffRangeStaysBelowTheEphemeralRange (a host whose
ephemeral range starts at 15000 must get [10000, 15000)) and
TestStartWithBindRetry (a taken port, then ok: one retry with fresh
ports) fail with the previous behaviour and pass here.

Refs #927.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:42:59 -08:00
pingqiuandClaude Opus 5.5 7c5a0ae8c4 ci: run C3 non-gating on shared runners until #905 is fixed
The first write after the holder reports its frontend ready can still be
answered namespace-not-ready for longer than a host retries (measured
18 s with retries on a shared runner). That is a product finding tracked
in #905 and a v1.1 release gate; the test keeps running and reporting on
every job, and the fix removes this marker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:32:31 -08:00
Ping Qiu 0022052d54 Merge pull request #910 from seaweedfs/feat/o1-upgrade-pass
storage: the attach runs the upgrade compare pass; sealing requests wait for it
2026-12-01 21:31:51 -08:00
Ping Qiu 574f1b056d Merge pull request #923 from seaweedfs/test/hostlimit-handoff-first-turn
hostlimit: test, a skip is allowed on each worker's first turn only
2026-12-01 20:38:46 -08:00
Ping Qiu dee857b2f3 Merge pull request #915 from seaweedfs/ci/process-level-artifacts
ci: keep the process-level logs and shard results when a run fails
2026-12-01 20:32:30 -08:00
pingqiuandClaude Opus 5.5 444562db12 hostlimit: test, the hand-off bound must check at least one later turn
Fail if no hand-off went to a worker's later admission: the skip-window
bound applies only to those, so without one the test would pass checking
nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 20:14:11 -08:00
pingqiuandClaude Opus 5.5 a74c46b302 hostlimit: test, a skip is allowed on each worker's first turn only
TestOneStalledTicketCostsOneSkipNotEveryHandoff failed under load with
gaps [581ms 11ms 4ms 8ms 11ms 4ms]: each worker (its own limiter) judges
the stalled ticket on its own clock, which runs only while the slot is
free, so a worker whose clock started late pays its one skip on its first
turn. The skip-window bound now applies to a worker's later admissions
only (paying the skip again); the failure prints each gap with its worker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 20:11:53 -08:00
Ping Qiu 664a31451d Merge pull request #921 from seaweedfs/test/nongating-preview-fencing
ci: non-gating named tests (with an issue); the replicated preview's fencing round runs and reports without gating (#920)
2026-12-01 20:03:50 -08:00
Ping Qiu 57445f3340 Merge pull request #919 from seaweedfs/test/nvme-initiator-host-retries
test: retry transient NVMe completions within host budget
2026-12-01 19:50:25 -08:00
pingqiuandClaude Opus 5.5 4f3c28fde4 storage: bound the partial-cursor test's Close join
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 19:46:23 -08:00
pingqiu 30bbbbc46d Merge remote-tracking branch 'origin/main' into feat/o1-upgrade-pass 2026-12-01 19:45:13 -08:00
pingqiuandClaude Opus 5.5 08562e28d4 storage: pass stop tests let the stop, not a release, free the held compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 19:40:50 -08:00
pingqiuandClaude Opus 5.5 f9cca837b0 ci: named tests can be non-gating with an open issue; the preview fencing round is (#920)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 19:37:14 -08:00
pingqiu 935b7c46cb test: print each retryable completion and retry decision 2026-12-01 19:32:12 -08:00
Ping Qiu 1bc6096184 Merge pull request #912 from seaweedfs/test/hostlimit-handoff-bound
hostlimit: test, ticket waits bounded by their property
2026-12-01 19:29:15 -08:00
pingqiu 5ac568bc79 test: retry transient NVMe completions within host budget 2026-12-01 19:28:56 -08:00
pingqiuandClaude Opus 5.5 68b822649b storage: upgrade pass cursor before the marker, rewind before the publisher
An unseeded upgrade writes the pass's first cursor before the store's
marker, so a crash before the pass's first persist still resumes it. The
attach prepares the pass (and makes a rebuilt page's rewind durable)
before the layer's hooks and the record's due loop start, so a rebuilt
page cannot be republished as valid under the old cursor. The barrier
hook also yields to a stop; the rewind test checks the cursor on disk
while the pass runs; the superseded test checks the published bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 19:27:55 -08:00
pingqiuandClaude Opus 5.5 7f26eded1b hostlimit: test, two more ticket waits bounded by their property
- TestStalledEarlierTicketIsSkipped: instead of passing within 700 ms of
  the start, no attempt passes before the skip time and the first attempt
  begun after it passes (a 50 ms allowance for the skip judge's clock);
  the attempts' start times are printed. A loaded host's late polls no
  longer fail it (1.155 s seen on CI).
- TestUrgentProceedsPastAStalledProbe: the admission runs with an outer
  bound of ten hold waits (a block behind the probe would never return)
  and must take at least its hold wait, instead of at most hold wait +
  300 ms (1.153 s seen on CI).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 18:56:06 -08:00
pingqiuandClaude Opus 5.5 e74a4eccc2 ci: keep the process-level logs and shard results when a run fails
The harness already copies each failed test's full daemon logs to
SWBLOCK_TEST_LOG_DIR (keepFullLog), but the workflow never set it and
uploaded nothing, so a failure's evidence was lost with the runner's
temp directory. Set the directory and upload it, with every shard's
JSON, log and status, as an artifact on failure (14 days).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 18:52:02 -08:00
Ping Qiu eed6b08bbc Merge pull request #894 from seaweedfs/feat/v8-list-codecs
Persist session-owned lists and their consumption cursor
2026-12-01 18:38:29 -08:00
pingqiuandClaude Opus 5.5 0726214734 storage: the upgrade pass rewinds to the earliest rebuilt page, not any unknown chunk
The open records the first chunk of the earliest page it rebuilt (the
kernel's cursor_back); the pass rewinds there, durably, before any request
is admitted. With no cursor a pass starts only after an unseeded upgrade
by this attach or a rebuilt page: chunks unknown only because they were
written after their page are dirty, and cuts take them, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 18:37:18 -08:00
Ping Qiu 3b1b3ef3ac Merge pull request #907 from seaweedfs/fix/precopy-rate-floor
storage: a pre-copy rate sample survives an upload below the clock tick
2026-12-01 18:30:31 -08:00
pingqiuandClaude Opus 5.5 bf9cec70ec hostlimit: test, a hand-off's idle bound is the skip window
TestOneStalledTicketCostsOneSkipNotEveryHandoff bounded each hand-off's
idle gap at a fixed 200 ms, which a loaded runner exceeded (295 ms). A
hand-off that paid the stalled ticket's skip idles at least the skip
window, so that is the bound now; the failure prints every gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 18:23:14 -08:00
pingqiuandClaude Opus 5.5 ead21f46b1 storage: the upgrade pass rewinds below its cursor; a write supersedes a compare
A page rebuilt at open leaves its chunks unknown again behind the pass's
cursor (completed or partial): the attach now rewinds the cursor, durably
and before the layer admits any request, to the first unknown chunk. A
chunk written between the pass's read and its hash is superseded by the
write: not hashed, not counted as compared, reported (Superseded); it is
dirty and the next cut takes it, also after a restart. A failed attach
joins the record writer it started. The pass tests hold the pass at a
barrier inside a compare instead of racing a timed walk.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 18:23:14 -08:00
pingqiu 3a5381eebc Merge remote-tracking branch 'origin/main' into feat/v8-list-codecs 2026-12-01 18:19:51 -08:00
Ping Qiu 3352749de7 Merge pull request #893 from seaweedfs/feat/v8-snapshot-generation
Add snapshot incarnation codecs and target-qualified delete helpers
2026-12-01 18:18:44 -08:00
pingqiuandClaude Opus 5.5 a6d1f4d93b storage: keep the floored payload sum out of the cut statistics
The tick-floored payload sum was an unexported field of ChunkCutStats, so
the layer statistics grew a field the cut body does not mirror (the
mirror test counts every field). The cut now keeps the sum locally and
hands it to samplePrecopy; ChunkCutStats is unchanged from main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 18:06:22 -08:00
pingqiuandClaude Opus 5.5 bf548585e0 storage: tests of the upgrade itself attach with no compare pass after it
Tests that assert the record state an upgrade leaves (unknown chunks, a
seed, a crash at each step, a stale page) and the heap measurements now
attach with no compare pass (withoutUpgradePass): the pass would move the
state they read, or only slow a measurement of a large sparse volume.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:49:13 -08:00
Ping Qiu aeb0078902 Merge branch 'main' into feat/v8-snapshot-generation 2026-12-01 17:41:24 -08:00
pingqiuandClaude Opus 5.5 409e7cb522 Merge main into fix/precopy-rate-floor
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:40:40 -08:00
Ping Qiu 4655664cf5 Merge pull request #903 from seaweedfs/fix/cgroup-unresolved-fallback
blockvolume: an underivable cgroup memory limit starts on the default
2026-12-01 17:40:12 -08:00
pingqiuandClaude Opus 5.5 e73f30530e docs: regenerate the status schema for Stats.UpgradePass
The status schema's generated block comes from the code: the hand-written
rows are replaced by the generated ones, with the field comments on
UpgradePassStatus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:35:27 -08:00
pingqiuandClaude Opus 5.5 3ea35a5d5d storage: tests attach after the upgrade compare pass, unless they watch it
An attach after an unclean v1.0 upgrade runs the compare pass and refuses
cuts until it ends, so the attach helper now waits for it as it waits for
reconciliation (its own bound: a 262,144-chunk test volume takes seconds).
Tests that act while the pass runs opt out (withoutPassWait).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:33:54 -08:00
Ping Qiu a654ff23d0 Merge pull request #883 from seaweedfs/feat/v4b-pr4
storage: one-byte record kinds, the ref table, O(C) commits and no flat map on v1.1 (V4-B PR 4, commits 1-4 of 5)
2026-12-01 17:30:45 -08:00
Ping Qiu 72c2a63c33 Merge pull request #908 from seaweedfs/test/adopt-waits-frontend-ready
blockvolume tests: adopt waits for FrontendPrimaryReady before the first write
2026-12-01 17:25:23 -08:00
Ping Qiu f5444eb237 Merge pull request #895 from seaweedfs/feat/v5-incremental-build
authority: a heartbeat that changes nothing wakes no observation rebuild
2026-12-01 17:17:07 -08:00
Ping Qiu ce071bdbf1 Merge branch 'main' into feat/v8-snapshot-generation 2026-12-01 17:15:51 -08:00
pingqiuandClaude Opus 5.5 812fcffb35 storage: the attach runs the upgrade compare pass; sealing requests wait
After a v1.0 store's upgrade with no clean-stop seed every whole local
chunk is unknown. The v1.1 attach now runs the compare pass (resuming at a
persisted cursor, or starting when the record holds an unknown chunk); it
compares each unknown chunk with HEAD by the cut's own transitions. A stop
never waits for it: the pages and cursor of the work done are persisted
and the next attach resumes. Until it ends, a cut, snapshot, backup or
sealing detach is refused typed (ErrUpgradePassInProgress, HTTP code
in_progress) and the pass runs at full rate. Holder status reports
Stats.UpgradePass {State, Compared, Total, Outcome}.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:15:16 -08:00
pingqiuandClaude Opus 5.5 ccb9215f75 storage: red test, an unclean-stop upgrade leaves no unknown chunk after the pass
TestV11UncleanUpgradeLeavesNoUnknownAfterThePass: a v1.0.x store attached on
the v1.1 format with no clean-stop proof (an unclean stop) opens with every
whole local chunk unknown; the attach must then run the compare pass, which
leaves none unknown: chunks equal to HEAD end published with HEAD's hash, a
chunk that differs never with HEAD's hash. Fails on main: after 20 s all 16
chunks are still unknown, because the pass has no production caller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 17:06:48 -08:00