Commit Graph
4785 Commits
Author SHA1 Message Date
Ping Qiu 3cbb7cf2eb Merge pull request #911 from seaweedfs/feat/b1-candidate-bitmap
storage: a cut's guest pause does O(1) work; candidates by change
2026-12-01 23:32:33 -08:00
Ping Qiu 22783f605d Merge pull request #909 from seaweedfs/test/noflush-passive-progress
durable: test, the no-flush passive wait follows the flusher's cycle
2026-12-01 23:26:41 -08:00
Ping Qiu 1b59e1a371 Merge pull request #934 from seaweedfs/ci/require-nvme
ci: stop a self-hosted job whose work or temp dir is not on NVMe
2026-12-01 23:14:31 -08:00
Ping Qiu 0cf187152d Merge branch 'main' into feat/b1-candidate-bitmap 2026-12-01 23:11:54 -08:00
Ping Qiu 34a3dc6af9 Merge pull request #931 from seaweedfs/fix/record-commit-needs-hash
storage: the record's Commit needs a hash it holds (v1.0 landed chunk)
2026-12-01 23:11:36 -08:00
Ping Qiu 5b720464a8 Merge pull request #914 from seaweedfs/fix/nvme-busy-write-diagnostics
Log retryable NVMe write failure causes with a target rate limit
2026-12-01 23:11:30 -08:00
Ping Qiu 31e23aba4b Merge branch 'main' into test/noflush-passive-progress 2026-12-01 22:56:37 -08:00
pingqiuandClaude Opus 5.5 a2419b2cec ci: judge tmpfs by filesystem type; an lsblk error voids its output
A tmpfs mounted under another source name (shm, a custom label) was
refused because the check compared the source name. And an lsblk that
printed an NVMe disk and then failed was accepted, since its status was
discarded. The check now reads the filesystem type from df and treats any
lsblk failure as "not a block device". Two stub cases pin both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 22:53:34 -08:00
Ping Qiu 5085b13695 Merge branch 'main' into fix/record-commit-needs-hash 2026-12-01 22:51:17 -08:00
Ping Qiu 512c0e1db6 Merge branch 'main' into fix/nvme-busy-write-diagnostics 2026-12-01 22:51:13 -08:00
pingqiuandClaude Opus 5.5 4ec8ec06e6 ci: stop a self-hosted job whose work or temp dir is not on NVMe
One runner box kept its runners' work, temp and Go cache directories on
its SATA system disk (the default install puts _work under the runner
directory in /home). Under the process-level tests' fsync load that disk
saturated and jobs timed out, which read as test failures.

The first step of the test and known-bugs jobs on a self-hosted runner now
checks that every disk behind the workspace, RUNNER_TEMP, TMPDIR and GOCACHE
is NVMe (tmpfs accepted) and fails naming the runner and the directory
otherwise. GitHub-hosted runners skip the step. The script's test stubs df
and lsblk: NVMe, tmpfs, a not-yet-created dir pass; SATA, an array with a
SATA member and a network share fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 22:45:32 -08:00
Ping Qiu 7f8367c495 Merge pull request #913 from seaweedfs/feat/format-gate-master
master: cluster format level (FORMAT-GATE): finalize-format, level-0 v1.0 semantics, retire-host
2026-12-01 22:28:14 -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
pingqiuandClaude Opus 5.5 2d2327e8e8 durable: test, every store read on the busy path is bounded
The no-flush busy path observes the store only through a bounded
snapshot: the checkpoint at the busy write, the target, the retry log
and the timeout diagnostic, which reports the last observation (or
"unavailable") instead of a fresh read. The busy-path check is a
function the burst test calls, so a control drives it with the store
lock held across the deadline at each observation, and released early.
The wait's control gains an early-release case that must return the
advanced checkpoint, a lower bound for the held case, and joins every
fake read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 22:05:37 -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 4753c7ed20 storage: guard that v1.1 extent writes never land an absent chunk
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:56:14 -08:00
pingqiuandClaude Opus 5.5 81600716ca durable: test, the passive checkpoint wait is bounded by its deadline
The passive wait's checkpoint read takes the store's read lock, which a
checkpoint publication holds across its descriptor I/O; a stall there kept
the loop from rechecking the write's retry deadline. The wait is now
passiveCheckpointWait, with every read through boundedRead (a read still
blocked at the deadline ends the wait, reported as blocked), and no read is
started after the deadline.

TestPassiveCheckpointWaitIsBoundedByItsDeadline: a read blocked behind a
held lock, and a checkpoint that never advances, each with the flusher
always in a cycle, end at the 300 ms deadline; with the read unbounded the
first case hangs until the test's timeout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:55:45 -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 f8b3b85989 storage: the record's Commit needs a hash it holds
On a v1.0 shadow a cut can capture a written absent chunk while its
absence stands (no Hash), and the flusher can then complete the chunk's
local bits (P to U, no version change) before the publish. The publish's
Commit met U and the kernel refused it. Commit is now sent only when the
record holds the chunk's hash (HU or HP); the chunk stays a candidate.

Fixes #922.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:46:25 -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
Ping Qiu 437c11129c Merge branch 'main' into fix/nvme-busy-write-diagnostics 2026-12-01 21:35:25 -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 9f5b8ad37e Merge branch 'main' into feat/b1-candidate-bitmap 2026-12-01 21:32:01 -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
pingqiuandClaude Opus 5.5 49f7d3fe29 format gate tests: comments say what each test does
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:11:01 -08:00
pingqiuandClaude Opus 5.5 6d24db415c format gate test: the held publication admission is released and joined on cleanup
A failure before the release no longer strands Publisher.Run: a cleanup,
run before the master's close, releases the hold and joins the admission's
return within 10 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 20:43:30 -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
pingqiuandClaude Opus 5.5 4192cc58f7 format gate: every reported volume keeps its level; a held ask is judged at its release
A heartbeat may report several volumes: each gets its read level, not
only the first. A test seam on the publication admission holds a real
admitted bind while a downgrade is reported; released, the same ask is
refused by the format check. The layout-ready guard names the admission's
new inner function.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 20:38:03 -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
pingqiu-cpu 2ffeb31b2f Merge branch 'main' into feat/b1-candidate-bitmap 2026-12-01 20:28:46 -08:00
pingqiuandClaude Opus 5.5 da217ed376 storage: the pause accounting is the capture's own
resolveTouchFilled and the touched set's allocation also run on readers
(status, pre-copy, the shadow: peekTouched) without the capture lock; they
counted into the capture's paused/pauseOps whenever a cut happened to be
paused, a data race and a misattribution. They count only on the capturing
goroutine now (byCapture); readers never touch those fields.

TestAReaderBesideCutsAndRecoveriesIsNotChargedToThePause runs a reader
beside cuts and recoveries (one just before the barrier); under -race it
reports 2 data races on the previous code and none now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 20:23:01 -08:00
pingqiuandClaude Opus 5.5 7cb93af9ec format gate: a silent process keeps its level while its volume is served
Read levels are kept per (server, volume): a server runs one process per
volume, so a later report for the volume is its process restarted or
replaced. A silent process's entry stays while the server still serves
its volume (a placement, a live line); it leaves only on a retire, when
the volume is no longer served and the process has been silent past the
freshness window, or on a newer report for the same volume. The
publication-boundary test calls the admission directly with a recording
publish.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 20:19:53 -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 1add3afcd0 storage: the barrier only swaps the touched sets; a late recovery is a flag
- prepareTouched, before the barrier and outside the pause, runs the
  once-per-layer seed, a pending recovery's clean-fill touches, and makes
  the cleared spare set; takeTouched at the barrier is a pointer swap.
- A recovery that lands between prepareTouched and the barrier is taken
  at the barrier as a flag (O(1)): the window covers every chunk until it
  narrows, and the clean fills are judged after the pause, with the
  touched set's members. A refusal before the judgement keeps the request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 20:13:14 -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
pingqiuandClaude Opus 5.5 d8f828275a storage: red tests, no touched-set allocation or fill scan in the pause
- The touched set's allocation and the recovery's clean-fill enumeration
  now count themselves in PauseCandidateOps when the guest is paused.
- TestAColdFirstCutAllocatesNoSetInThePause: a layer's first cut at the
  1 TiB shape (fails: 4,097, the spare set allocated at the take).
- TestARecoveryJustBeforeTheBarrierIsJudgedAfterThePause: a recovery
  between the pre-barrier work and the barrier (fails: 9, the clean fills
  enumerated at the take); the cut must still judge every clean fill.
- TestTheFirstCutAfterWritesDoesNoPerCandidateWorkInThePause now fails
  too (the spare allocation).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 20:06:08 -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
pingqiuandClaude Opus 5.5 fadc4f0345 format gate: per-process read levels, the publication boundary checks them, the clamped grant stays monotonic
A server's per-volume processes may run different binaries: the read
level is kept per process (its heartbeat slot's incarnation) and a server
reads the lowest any of its processes reported within the freshness
window. A heartbeat is judged on its own process's level.

The final publication boundary and the promotion gate check the target
server's current level, so an ask decided before an old process reported
is not published.

A level-0 grant clamped to the horizon is now + the time left to it, so
the deadline (read by the level-1 barrier after a finalize) keeps the
monotonic reading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 20:01:10 -08:00
pingqiuandClaude Opus 5.5 72e429830c storage: the guest pause does O(1) work; the candidates are judged after it
In the pause, a cut now syncs (H), takes the touched set and the dirty set
by pointer swaps, and opens the copy window over what they name (a
superset of the candidates, a lookup per chunk). Everything per candidate
runs after the pause, under the window: the judgement (WAL entries up to
H), the known-equal filter, each candidate's version, staged reuse, the
record shadow check, the base refs, the copy-order hint and the
HEAD-behind refusal. The window then narrows to the candidates.

- A candidate's version at the barrier is read atomically with the write
  path: the version a guest write's save recorded with its bytes, else the
  live one under the window lock. The window closes on a chunk only after
  its version is read and it is uploaded.
- A refusal before the judgement returns the taken sets (touched again,
  the dirty set rejoins l.dirty). After it, the existing requeue does.
- A pre-copy attempt keeps its drained frontend drained through the
  judgement and decides its freeze on the judged tail, as before: its guest
  pause runs to that release.
- The record shadow check exempts chunks written since the barrier (the
  live touched set): the record already counts those writes.
- PauseCandidateOps counts per-candidate operations while the guest is
  paused; it is 0 for an ordinary cut. The cut body and the status schema
  carry it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 19:58:17 -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
pingqiuandClaude Opus 5.5 3f911ff43f storage: red test, the guest pause does no per-candidate work
TestTheFirstCutAfterWritesDoesNoPerCandidateWorkInThePause: the first cut
after writes to many chunks must do no per-candidate operation between the
barrier's lock and its release, at 32 blocks and at the 1 TiB shape with
256 changed chunks (fails: 73 and 1,600 operations; the candidate step,
the known-equal filter, versions, the base refs and the copy-order hint
all run in the pause).

Seam: chunkCutStats.PauseCandidateOps, counted while a pause flag is up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 19:30:22 -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 3dd2c6af89 storage: the cut's copy window is installed in O(1) at the barrier
The window no longer sorts the candidates and makes one entry (with its
channel) per candidate inside the guest pause. It keeps the candidate set
and the staged marks (immutable once installed) and makes a chunk's entry
on its first touch: a guest write's save or the copier. Side-file slots
are handed out in touch order. After the pause, the copier lists the
covered chunks that a pre-copy does not hold and no touch has finished.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 19:26:58 -08:00