Commit Graph
4401 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 e54770ea69 storage: the runtime record publishes pages in order and needs hash evidence
pubMu is held across a page's snapshot and write, and across the header, so
no writer lands an older page after a newer one. A transition into a known
hash needs the hash; a commit needs the hash its cut captured to still be
the chunk's, else it is refused as stale; an ignored event keeps the hash; a
refusal changes nothing. The constructor copies its inputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:15:47 -08:00
pingqiuandClaude Opus 5.5 87e064a974 test(storage): the runtime record's page order, hash evidence and ownership
Reds: a parked page writer lands an older snapshot after a newer one; an
ignored fill replaces the hash, a hash event without a hash makes it known,
a stale captured hash commits; the caller's slices alias the state. The
evict control fails instead of skipping, and the refused edge pins effect,
hash and dirty accounting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:15:01 -08:00
pingqiuandClaude Opus 5.5 2c22120a79 storage: the chunk record while the volume serves
Every chunk's state in memory, changed only through the kernel. Every event
dirties its page (a write that keeps the state still moves the chunk's store
position); an evict writes its page before Apply returns, so the bytes are
dropped after it. Pages are written on their own schedule (a count of
changed entries or an age), valid through the applied position the shell
raises after each write's Apply; Flush writes the header only when every
page is clean after the page writes. WriteThrough writes the dirty pages
below a chunk, for the upgrade pass. No caller yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:07:36 -08:00
Ping Qiu c4edc98eb0 Merge pull request #831 from seaweedfs/feat/v11-upgrade-pass
storage: the upgrade's compare pass with a persisted cursor
2026-11-30 10:02:44 -08:00
Ping Qiu 096c78d9cc Merge pull request #818 from seaweedfs/feat/v4a-commit-by-change
v1.1 V4-A: commit by change (layout delta + required CASHeadDelta)
2026-11-30 10:02:31 -08:00
Ping Qiu c56d8e77cf Merge pull request #810 from seaweedfs/feat/chunk-state-kernel
Add pure model-derived chunk state kernel skeleton
2026-11-30 10:02:23 -08:00
Ping Qiu 2029863483 Merge pull request #832 from seaweedfs/fix/delete-head-conflict-main
main: cherry-pick of #830, a raced snapshot delete answers head_conflict
2026-11-30 10:02:12 -08:00
Ping Qiu e876a773bc Merge pull request #826 from seaweedfs/feat/lab-bigvol-tag
v1.1 V0: lab-only build tag swblock_lab_bigvol (create cap, headroom), kept out of every image
2026-11-30 09:12:40 -08:00
pingqiu 6bba362ece docs(invariants): INV-CATALOG-HEAD-CONFLICT-001 registers the delete-race tests
A companion of INV-CUT-ERROR-PRECEDENCE-001 (whose statement is at its
length limit): a catalog transition that lost its conditional HEAD write
reports head_conflict, never internal, and decides last. Its tests are the
two delete-race regressions and the typed table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 77fa10070e)
2026-11-30 08:06:08 -08:00
pingqiu c6528d7740 fix(volume): the layout precondition decides last
The layout.ErrPrecondition case moves to the last position before default,
so every other cause an error carries decides first, the non-retryable
ones (closed, detached, frozen detach unsupported, an invalid freeze
budget, not a chunk volume) included. Controls: each joined with the
precondition reports its own code; with the case moved back to its
earlier place the closed, detached and frozen-detach rows fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 64eddb3484)
2026-11-30 08:06:07 -08:00
pingqiu 2fb4ffee6e fix(volume): a snapshot delete that loses its HEAD write is head_conflict
chunkErrorCode maps layout.ErrPrecondition (a catalog transition lost its
conditional HEAD write to another writer, such as a cleaning's begin) to
head_conflict, 409, retryable, as it maps the engine's HEAD precondition.
It answered internal before. The case sits with the HEAD-precondition one,
after every terminal and uncertain cause, so a joined error keeps its
precedence. The operator guide and the v1.0.1 notes say to retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 3a5de69079)
2026-11-30 08:06:07 -08:00
pingqiu 2d1f1efaae test(volume): a snapshot delete raced by a HEAD write is a head conflict
The holder's cleaning begins between a snapshot delete's HEAD read and its
conditional write: the delete fails on the HEAD precondition, nothing of it
applies, and a retry completes. Red: the refusal maps to 500 internal, not
retryable; under a persistent conflict every attempt is internal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 031312357b)
2026-11-30 08:06:07 -08:00
pingqiu dc96926db3 Merge remote-tracking branch 'origin/main' into feat/v11-upgrade-pass 2026-11-30 07:50:23 -08:00
Ping Qiu 21f2f3e591 Merge branch 'main' into feat/v4a-commit-by-change 2026-11-30 07:49:40 -08:00
Ping Qiu 0f1fccdfb0 Merge pull request #817 from seaweedfs/feature/v11-store-format
storage: fence chunk-state upgrades and persist checked record pages
2026-11-30 07:49:23 -08:00
pingqiuandClaude Opus 5.5 ddae9d743f storage: the upgrade pass rewinds only at open; a failed rewind latches it
As the model has it: a page found damaged at open is rebuilt and the pass
rewound before Run; Rewind after Run has started is refused. A page found
damaged while the process lives is rewritten from memory, with no cursor
change. A rewind whose cursor cannot be written latches the pass: Rewind,
Run and page writes are refused and Admit refuses until reopen. The page
lock and the walker generation are removed: no rewind can meet a walk.

The random interleaving test, reworked to this design, failed at seed 20
without the latch (a rewind failed at open, then the page was rewritten
from memory as unknown under the old cursor); green with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 07:48:52 -08:00
Ping Qiu e7a6526557 Merge pull request #827 from seaweedfs/ci/alpha-tags-only
ci: publish images on version tags only, not on every push to main
2026-11-30 07:48:26 -08:00
pingqiuandClaude Opus 5.5 694e473691 storage: one page lock across a write-through and a rewind
pageMu is held across a write-through (an outstanding rewind's publication,
the page write, the cursor after it) and across a rewind (the caller's
rebuild in memory, now a callback of Rewind, and its publication), so no
page write is in flight while a rewind is made or unpublished.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 07:42:37 -08:00
pingqiuandClaude Opus 5.5 20a3d21177 test(storage): a rewind waits for a page write in flight
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 07:42:06 -08:00
pingqiuandClaude Opus 5.5 be30032428 storage: the upgrade pass writes its cursor by one rule
The persisted cursor is only ever min(the earliest rewind not yet published,
the last position whose pages were written through), and no page is written
while a rewind below the persisted cursor is unpublished: advance publishes
an outstanding rewind before its write-through. A rebuilt page is written by
the caller only after Rewind returns nil.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 07:35:02 -08:00
pingqiuandClaude Opus 5.5 44c53c42ee test(storage): the upgrade pass's cursor rule under random interleavings
A seeded random mix of partial walks, page damage with rewinds, failed page
and cursor writes, and crashes with reopen: every chunk behind the persisted
cursor must be compared and written, or its page still damaged on disk. And
the review's witness: a failed rewind to 20, a walk through 20..29 without a
write-through, then a rewind to 60.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 07:35:02 -08:00
pingqiuandClaude Opus 5.5 22e80a6e73 storage: a rewind writes the earliest outstanding position
A rewind whose cursor write failed leaves the walk position at its chunk; a
later rewind to a higher chunk writes that position, not its own, so a
reopen never skips the chunks of the failed one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 07:26:16 -08:00
pingqiuandClaude Opus 5.5 2cd6f1de1a test(storage): a failed rewind's position is kept by the next; bounded walker test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 07:25:49 -08:00
pingqiuandClaude Opus 5.5 9ccda0ead6 storage: one walker, rewind closes admission first, counts kept on the pass
Run refuses a second walker. A rewind moves a generation: a compare begun
before it does not move the walk position past the rewound chunk, and a
persist begun before it keeps the lower cursor. Rewind closes admission and
moves the walk position before writing the cursor, so a failed write leaves
the pass refusing and the next Run writes the lower cursor. Work counted
since the last persisted cursor lives on the pass, so a cancelled or failed
Run's count is kept by the next one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 07:19:10 -08:00
pingqiuandClaude Opus 5.5 881b29f3aa test(storage): the upgrade pass's failed rewind, second walker and kept counts
Reds: a rewind whose cursor write fails leaves admission open; a second Run
walks beside the first and a rewind during a compare is overrun; work
counted but not persisted is lost on a cancel or a failed write. Also a
pause control for the rate limit and the refusal's text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 07:17:49 -08:00
Ping Qiu d63c4223c0 Merge pull request #825 from seaweedfs/test/start-wal-replay-main
test: carry startup WAL replay interruption coverage to main
2026-11-30 07:16:23 -08:00
pingqiuandClaude Opus 5.5 ac058cb6e4 storage: the upgrade's compare pass with a persisted cursor
After the upgrade every local chunk's hash is unknown. The pass walks the
chunks with a cursor, persisted only after the pages of every chunk behind
it; a restart continues at the cursor; a rebuilt page moves the cursor back
to its first chunk, persisted. While it runs, a request that needs every
hash known is refused at once with in_progress and the pass's progress, and
a waiting request lifts the pass's pause. No caller yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 07:09:20 -08:00
pingqiu d2a79d43f2 fix: freshly sync reopened upgrade fences and cover payload checks 2026-11-30 06:51:02 -08:00
pingqiuandClaude Opus 5.5 0db65a8cc6 ci: refuse a manual image publish that is not on a version tag
A workflow_dispatch from a branch would still write :alpha. The publish job
now runs only when the ref is a v* tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 06:46:21 -08:00
Ping Qiu d7e2675129 Merge pull request #829 from seaweedfs/docs/restored-refetch-main
docs: a read-only restored volume fetches every chunk again after any restart
2026-11-30 06:45:59 -08:00
pingqiu 2653a662ae docs: a read-only restored volume fetches every chunk again after any restart
The v1.0.1 known limit and the standalone restore steps said fetched chunks
are fetched again after a crash; a restored volume that has only been read
takes no checkpoint, so it fetches all of them again after any restart,
clean included, until a write or its next checkpoint records them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 3759fae784)
2026-11-30 06:43:46 -08:00
pingqiuandClaude Opus 5.5 d7d5fcc8b2 ci: publish images on version tags only, not on every push to main
main now carries the next minor version in development, which will bring a
one-way store format change. Publishing on each push to main would move the
public ':alpha' and 'sha-*' tags to those development builds. Images are
published only for version tags (and manual dispatch) until the image tag
policy for development builds is decided.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 06:41:11 -08:00
pingqiu 9947e8567d docs: close the integrated chunk-page position trace 2026-11-30 06:39:41 -08:00
Ping Qiu b8c9883c32 Merge pull request #816 from seaweedfs/feat/v11-record-pages
storage: chunk record pages; an unfinished record behind the store is never used
2026-11-30 06:37:28 -08:00
Ping Qiu 35381d6bde Merge pull request #815 from seaweedfs/test/powerloss-replay-main
test: carry the power-loss replay fixture repair to main
2026-11-30 06:33:50 -08:00
pingqiuandClaude Opus 5.5 748e4bc5e6 lab tag: the wiring check pins an executed refusal; every read is checked
The refusal must be an executed line, RUN bash scripts/refuse-lab-binary.sh,
after the recipe's last go build and naming every binary the recipe builds
(go build ... -o /out/NAME); a comment no longer counts. Each recipe and the
publish workflow is read once with a checked read, so a read error fails
instead of reading as no match; failures go to stderr. The controls now
start from copies of the real recipes and publish workflow: the guard
deleted with its comment kept (both recipes), commented out, a built
binary left out, a new binary not refused, the refusal before the build,
and an unreadable recipe (Linux), each refused for its own reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 06:31:25 -08:00
pingqiuandClaude Opus 5.5 549524f537 lab tag: a lab binary names itself and no image can hold one
A lab build's revision carries LAB BUILD(swblock_lab_bigvol), so -version and
the volume's /status show it. Every image Dockerfile runs
scripts/refuse-lab-binary.sh right after its go build: a binary that is a
lab build, or cannot answer -version, stops the image build, so neither
the publish workflow nor the image scripts can push one. lab-tag-check.sh
now fails closed: an allowlist of the files that may name the tag (git grep;
a scan that cannot run fails), plus the wiring (each Dockerfile refuses
after its last build; the publish workflow builds only from those, with no
go build of its own). Controls cover each contamination and the refusal
script's stand-in binaries. The lab headroom test asserts the warning, and
both invariant rows name the lab exception.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 06:22:45 -08:00
pingqiu 39b6b164ed docs: keep experimental address codecs outside the widening scope 2026-11-30 06:22:43 -08:00
pingqiu 57f12f6b32 test: inventory persisted address widths and pin wide WAL addresses 2026-11-30 06:18:47 -08:00
pingqiuandClaude Opus 5.5 1ca31ed44c geometry, durable: a lab-only build tag for scale rehearsals
The swblock_lab_bigvol tag lifts the 256 GiB create cap to the format's own
limit (16 TiB - 4 KiB) and turns the local headroom refusal at create into a
warning, so the scale rehearsals can create sparse volumes larger than the
release allows and than the disk. A release build is unchanged and pins
that (TestReleaseBuildKeepsTheCreateCap). CI refuses the tag under deploy/
and in every workflow but test.yml (lab-tag-check.sh, with controls), and
tests the lab build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 06:11:21 -08:00
pingqiu 845f435115 fix: pin chunk kernel table to model export 2026-11-30 05:58:24 -08:00
pingqiu 92dac05d36 test: verify replay kill status and release failed seeds 2026-11-30 05:47:21 -08:00
pingqiu 25d9867619 test: kill startup WAL replay at record and batch boundaries 2026-11-30 05:47:21 -08:00
pingqiu bab1cf39ad feat: drive chunk kernel from published-state model table 2026-11-30 05:39:37 -08:00
pingqiu 60bb7c8fed feat: add pure model-derived chunk state kernel 2026-11-30 05:39:36 -08:00
Ping Qiu 1f536ae262 Merge pull request #824 from seaweedfs/docs/remote-unavailable-bound-main
docs: remote_unavailable also follows a request that ran out of its 5-minute bound
2026-11-30 05:21:17 -08:00
pingqiu e70a6aef4f docs: remote_unavailable also follows a request that ran out of its 5-minute bound
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit efb91181e0)
2026-11-30 05:19:40 -08:00
Ping Qiu 31bd759ec7 Merge branch 'main' into feat/v4a-commit-by-change 2026-11-30 04:45:35 -08:00
Ping Qiu d0b859e630 Merge branch 'main' into test/powerloss-replay-main 2026-11-30 04:45:32 -08:00
Ping Qiu 0f1f316d44 Merge pull request #821 from seaweedfs/ci/pr-tp04-main
ci: run Test for same-repo pull requests on the self-hosted runner
2026-11-30 04:41:57 -08:00