Commit Graph
1424 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 cde7dfac64 storage: chunk record shadow: bind the scratch exemption to its version; no strict-suite bypass
- the scratch-cut exemption holds only while the chunk keeps the version
  the scratch cut captured; a stale capture grants nothing
- TestMain has no switch that turns the strict findings off
- the raced-fill test bounds every wait and always releases and joins
  its reader

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 14:01:24 -08:00
pingqiuandClaude Opus 5.5 f0c11ac181 storage: chunk record shadow: bounded production check test; extras judged for cuts that proceed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 12:32:57 -08:00
pingqiuandClaude Opus 5.5 9146ecf598 storage: chunk record shadow review fixes
- the barrier check scans only the engine's candidates; the full scan of
  the record is test-only
- a pending proposal's captured chunks are committed in the record at
  the settlement that finds it landed (resolvePending, SettleDetach)
- extra record candidates are findings across the whole package's tests
- M5 diagram and table show the foreign-root fence

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 12:27:18 -08:00
pingqiuandClaude Opus 5.5 6075b713c5 docs: invariant rows for the chunk record shadow and the foreign-root fence
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 12:01:24 -08:00
Ping Qiu 7d8c775d2f Merge pull request #836 from seaweedfs/feat/v4b-cut-counters
v1.1 V4-B counters: a cut reports its manifest work
2026-11-30 11:57:48 -08:00
Ping Qiu b08d9a3dd4 Merge pull request #835 from seaweedfs/feat/v11-record-runtime
storage: the chunk record while the volume serves
2026-11-30 11:16:46 -08:00
pingqiu 3764cb988c docs: v1.0.1 note gives advance notice that two experimental engines go in v1.1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 6ccd3bfd2e)
2026-11-30 10:49:41 -08:00
pingqiuandClaude Opus 5.5 cdf18c1988 cut counters: ManifestNs is the commit check's; sends are counted as they complete
Review: ManifestNs summed every manifest span of the attempt, so a HEAD
re-read after a lost answer (inside HeadReadbackNs) was counted twice. It
is now the manifest work measured across the commit check only. The
write counts were whole successful ensures: a store wrapper now counts
each acknowledged create of a root or segment, with its bytes, as it
completes; an object already present sends and counts nothing, and a
failed commit keeps what it sent. Tests: a lost-answer cut keeps the slow
re-read out of ManifestNs (with the old sum it reads 60 ms in both);
three-shard full and by-change commits match byte totals computed from
the layout; a failed root send keeps the segment, and the retry sends only
the root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:36:07 -08:00
pingqiu c29d4868d8 docs: v1.0.1 note states the 200-volume density tested
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 58df877faa)
2026-11-30 10:28:24 -08:00
pingqiuandClaude Opus 5.5 9ab1478c5c storage: pages changed at open start dirty; bounded concurrency tests
The constructor takes the pages whose content the open changed (chunks
judged changed or rebuilt) and starts them dirty from their on-disk
position, so the header's G does not pass them until they are written again
by their age. The concurrency tests wait with local deadlines, assert that
the second writer waits for the first, and release and join on every path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:26:58 -08:00
pingqiuandClaude Opus 5.5 ba146134e2 storage, chunkstore: a cut reports its manifest work
ManifestNs was never set (always 0): it is now the time of the manifest
read and the segment writes, which run inside the commit check outside
every other measured part, so the pre-copy fixed parts gain it from their
remainder without counting it twice. Typed counts join it: HEAD's roots
and segments read, the roots and segments written, and their bytes,
counted by the layout remote (CountCutWork) on both the full commit and the
commit by change. They are in the cut stats, the /chunk/cut body (and the
status schema) and the cut log line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:20:50 -08:00
pingqiuandClaude Opus 5.5 6a68f7bb86 storage: the runtime record writes each page by its own trigger; G is fuzzy
A page is dirty only when what it says changes (a chunk's state or hash); a
write that keeps the state, or an ignored event, dirties nothing, since open
derives it again from the store's positions. Each page is due after its own
count of changes or its own age, so page writes follow the changes, not the
volume's size. The header's G is the least of the applied position and the
positions from which still-dirty pages went dirty (a fuzzy checkpoint), so
it moves under steady writes. State codes by a switch, not a map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:20:15 -08:00
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 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 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 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 dc96926db3 Merge remote-tracking branch 'origin/main' into feat/v11-upgrade-pass 2026-11-30 07:50:23 -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
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 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 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 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 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
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
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
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 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
pingqiuandClaude Opus 5.5 5b0c981632 storage: the record's completion reads the synced position, at open
completeChunkRecord takes P from the store's synced position, not the
assigned one, and refuses while a write is assigned but not synced: the
completion runs at open, after recovery and before guest I/O.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 03:42:37 -08:00
pingqiuandClaude Opus 5.5 5b95b66f8d storage: the record's header is written only over current pages; positions ahead are refused
completeChunkRecord fences, reads the store's durable position after the
fence, and writes the header (G = that position) only when every page is
present, passes its check and is valid through exactly that position. The
loader refuses positions ahead of the recovered store: an unfinished record
must equal it, a complete record's G may not pass it, a page ahead of it is
damaged. Pages carry the segment's candidate count, the segment name its
published marks refer to, and the kernel table version (chunk-kernel/2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 03:42:37 -08:00
pingqiuandClaude Opus 5.5 0a2d86dc44 docs(invariants): the chunk record's position check, as a STUB row
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 03:42:36 -08:00
pingqiu 6c5a1b42e4 docs: trace the chunk-state slot fence to its model rules 2026-11-30 03:09:02 -08:00
pingqiu c13cb1641a docs: register the inactive chunk-state upgrade fence invariant 2026-11-30 03:06:27 -08:00
pingqiu 108bc97677 docs: operator guide states the 5-minute request bound, not measured figures
The restore-target delete and the snapshot timeout paragraphs keep the
contract that follows from the server's 5-minute bound for one request and
drop the figures measured before the performance round.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 8719e9cace)
2026-11-30 02:46:20 -08:00
pingqiu 6113f8d345 docs: v1.0.1 note adds the start checks and later fixes; no unmeasured figures
Adds the start-up checks operators meet (workspace lease required, the
conditional HEAD probe, the stricter single-filer check, exit 79), the
snapshot position, schedule, upload and fsync fixes, and the forced-move
JSON. Limits are stated without performance figures measured before the
performance round; the gate line stays until the release gates end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 5c1c1c75b4)
2026-11-30 02:42:23 -08:00
pingqiu a224d22234 docs: v1.0.1 release note; drop the stale "coming in v1.0.1" lines
The note lists what v1.0.1 adds and fixes, its upgrade, limits and known
limits, checked against this branch. README, troubleshooting, the cleaning
page and the operator guide no longer call those changes unreleased; the
operator guide describes the CLI's own repeat of 5-minute requests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit e883ade9be)
2026-11-30 02:39:35 -08:00
pingqiuandClaude Opus 5.5 f79c1cad19 docs: verify checks every named snapshot; drop the refused --all-snapshots
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 23:32:13 -08:00
Ping Qiu 1f8d63ad67 Merge pull request #807 from seaweedfs/docs/replicated-stale-reads
docs: a cut-off replicated primary is not stopped by a lease and may serve stale reads
2026-11-29 22:06:47 -08:00
pingqiuandClaude Opus 5.5 bbebfd2d6f docs: a cut-off replicated primary is not stopped by a lease and may serve stale reads
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 21:34:35 -08:00
pingqiu 33b05fb17b Merge main f269e0ed (#797, #795) into train/20261130-t3 2026-11-29 20:41:16 -08:00
Ping Qiu f269e0ed2e Merge pull request #795 from seaweedfs/docs/master-uncertain-latch
docs(operator-guide): an uncertain workspace record refuses a volume's lease until blockmaster restarts
2026-11-29 20:18:16 -08:00
pingqiu 6939b1446f Merge #802 7f3decb7 into train/20261130-t3 2026-11-29 19:59:58 -08:00