Commit Graph
4426 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 691a95750e storage: describe the SPACE fixture's lazy attached shape
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 13:45:51 -08:00
pingqiuandClaude Opus 5.5 65795f4206 storage: SPACE red for the chunk record shadow at the 1 TiB shape
Heap per chunk after a cut, 262,144 chunks: stated 520 B in total and 56 B
for the shadow's share (measured 481 and 48).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 12:37:48 -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
pingqiuandClaude Opus 5.5 8db613cb01 storage: test the chunk record's BASE-completion event
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 12:01:24 -08:00
pingqiuandClaude Opus 5.5 570b884018 storage: drive the chunk record from the engine's events, in shadow
The chunk record (chunk-kernel/2) runs beside the engine's maps: every
write, fill, cut hash, commit and evict reaches it through the kernel,
and each cut's barrier checks that the record names every chunk the
engine captures. It decides nothing and writes no page yet.

A HEAD that moves the chunk root without superseding this holder now
fences the layer (errChunkForeignRoot).

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
Ping Qiu a4415e9767 Merge pull request #839 from seaweedfs/ci/pub-rc-own-tag-main
ci: a release candidate publishes only its own version tag
2026-11-30 11:16:08 -08:00
pingqiuandClaude Opus 5.5 c32199b872 ci: move :alpha only for the highest stable version; refuse odd tags
A stable tag moves :alpha only when it is the highest vX.Y.Z tag, so a
later patch on an older line never moves :alpha back. A tag that is not
vX.Y.Z or vX.Y.Z-pre fails the run instead of publishing. The checkout
fetches tags so the comparison sees them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:51:43 -08:00
Ping Qiu 4113709f98 Merge pull request #842 from seaweedfs/docs/v101-engines-notice-main
docs: v1.0.1 note gives advance notice that two experimental engines go in v1.1
2026-11-30 10:50:47 -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 82498e840d ci: a release candidate publishes only its own version tag
Only a stable-line release tag (vX.Y.Z, no pre-release suffix) moves the
public :alpha and sha-* image tags; a release candidate (vX.Y.Z-rc.N)
publishes its version tag alone. The workflow also runs only on version
tags and on a manual run from a version tag, never on a branch push.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:49:11 -08:00
pingqiuandClaude Opus 5.5 eeaa90de7d cut counters: a bounded HEAD re-read counts its reads; disjointness oracle
boundedManifest (the attach-fetch HEAD read the cut's settlement uses)
counted no root or segment read: each successful fetch is now counted as
it completes, so a later failed fetch keeps the earlier ones. Controls: a
real GetHead under WithAttachFetch counts 1 root and 3 segments on three
shards, and 1 and 1 when shard 1's fetch fails. The lost-answer test
asserts the disjointness that always holds (ManifestNs + HeadReadbackNs <=
TotalNs; the old sum exceeds it by the re-read's 100 ms) and that the read
counts include the re-read's, instead of a timing bound on the check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:49:03 -08:00
pingqiuandClaude Opus 5.5 624e2814cd test(storage): cleanup joins are non-fatal and budgeted by the test deadline
Each wait is at most 10 s and never past the test's deadline less a reserve;
a cleanup attempts every pending join, then reports the ones that timed out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:38:04 -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
pingqiuandClaude Opus 5.5 88bd3e9181 test(storage): the concurrency tests join only workers not yet joined
A failing path that already took a worker's result no longer leaves the
cleanup waiting on an empty channel; the evict-without-lock mutant now
fails at once instead of timing out in cleanup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:33:30 -08:00
Ping Qiu e5a81f5ed4 Merge pull request #838 from seaweedfs/docs/v101-density-main
docs: v1.0.1 note states the 200-volume density tested
2026-11-30 10:30:06 -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 40c4e1ac8e test(storage): a page changed at open holds the header's G
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 10:25:53 -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 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