Commit Graph
3130 Commits
Author SHA1 Message Date
pingqiu 84600a52fb Merge branch 'feat/oss-snap-abort' into feat/oss-snap-commit 2026-11-24 13:11:19 -08:00
pingqiu acd48588fa Merge branch 'feat/oss-snap-begin' into feat/oss-snap-abort 2026-11-24 13:11:17 -08:00
pingqiuandClaude Opus 5.5 3f68247013 test: the missing-lease control replaces claim.go
Added beside the real claim.go, the control's RunClaim was hidden by
the real one's lease wait once claim.go exists; it now replaces the
file, as a changed claim would.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 13:11:16 -08:00
pingqiuandClaude Opus 5.5 cfffb3fd7a layout: commit on an empty published image; walk the reached graph
An empty image is a real root: once it is HEAD's current root, a commit
with an empty previous manifest builds on it instead of being refused
as a stale base. Before any commit a previous manifest must be empty;
after one it must build to HEAD's current root.

The snapshot transaction's interrupt test now checks, right after each
kill, every object any root in HEAD reaches (current and snapshot roots,
their segments, this volume's chunks, bytes hashed against names), on a
fixture that stores real objects. Controls delete a reachable chunk, a
segment or a snapshot root, or tamper with a chunk, and each is
reported. Abort after a commit leaves the commit in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 13:09:53 -08:00
pingqiuandClaude Opus 5.5 bba3c97841 layout: Abort over idle means only that no activity remains
Abort when HEAD is already idle succeeds without a write whatever came
before (aborted, committed or never begun); its result never says
whether the session's work was committed, which is read from HEAD's
current root. Controls cover the never-begun and already-aborted cases.
The interrupt helper again requires exactly one HEAD write per
transition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 13:08:20 -08:00
pingqiu e6332c97ae Merge branch 'feat/oss-snap-abort' into feat/oss-snap-commit 2026-11-24 13:08:20 -08:00
pingqiu f2ba5fc0a6 Merge branch 'feat/oss-snap-begin' into feat/oss-snap-abort 2026-11-24 13:07:36 -08:00
pingqiuandClaude Opus 5.5 928e6a75aa test: the guard requires a declared claim to wait for the old lease
The lease rule checked whether the name RunClaim was used, not whether
the function was declared, so a declared RunClaim with no wait passed.
The guard now checks the package's declared functions: a declared
RunClaim must use OldLeaseEnded, and every declared exported Run
function must go through runTransition. Each negative control now
asserts the finding it is meant to cause.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 13:07:35 -08:00
pingqiu 5933f339ea Merge branch 'feat/oss-snap-abort' into feat/oss-snap-commit 2026-11-24 12:55:02 -08:00
pingqiu 38d480aa72 Merge branch 'feat/oss-snap-begin' into feat/oss-snap-abort
# Conflicts:
#	core/frontend/chunkstore/layout/head_test.go
2026-11-24 12:55:00 -08:00
pingqiuandClaude Opus 5.5 a842778c59 test: the HEAD guard sees every use of a writer name, not only calls
The guard now records every use of UpdateHead, runTransition,
OldLeaseEnded and Delete/Remove names, in function bodies and in
package-level initializers: a call, a method value or alias, a method
expression and an inline interface all count. Negative controls add
each form to the package's real sources and must be refused. The
comments on invalid UTF-8 now state what the old encoding did: it wrote
an escaped U+FFFD that its own canonical decode refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:54:44 -08:00
pingqiu 095093a571 Merge branch 'feat/oss-snap-abort' into feat/oss-snap-commit 2026-11-24 12:48:23 -08:00
pingqiu 44e3e5a31a Merge branch 'feat/oss-snap-begin' into feat/oss-snap-abort
# Conflicts:
#	core/frontend/chunkstore/layout/head_test.go
2026-11-24 12:48:22 -08:00
pingqiuandClaude Opus 5.5 84746790e9 layout: refuse HEAD names that are not valid UTF-8
The JSON encoding turns invalid UTF-8 into U+FFFD and still re-encodes
the same, so HEAD would store another holder, session, snapshot or
dependent name than the caller gave and a later lookup by that name
would find nothing. check() refuses such names, and runTransition
checks the next HEAD before writing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:47:56 -08:00
pingqiuandClaude Opus 5.5 ec5af310d3 test: kill a snapshot transaction at every write and restart it
The whole transaction (Begin, every new chunk, segment and root, then
Commit) is run once to enumerate its writes; for each it is killed
before the write applies and after it applied with its reply lost. The
restarted holder rolls back the session it finds open, begins a new
one, recomputes what is new against HEAD's current root, reuses the
objects already written by name and commits. Every run ends at the
committed image with every object it reaches present.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:43:10 -08:00
pingqiu f672be4545 Merge branch 'feat/oss-snap-begin' into feat/oss-snap-abort
# Conflicts:
#	core/frontend/chunkstore/layout/head.go
2026-11-24 12:42:06 -08:00
pingqiu d713c435aa Merge branch 'feat/oss-snap-abort' into feat/oss-snap-commit 2026-11-24 12:42:06 -08:00
pingqiuandClaude Opus 5.5 b3c7ae2b0b layout: one HEAD write path and its guard
Begin now writes through runTransition, the one read-apply-update path
every transition will use. A source-scan guard holds for the whole
series without edits: only runTransition calls UpdateHead and the store
cannot create a HEAD; every Run transition must have its closure and
interrupt tests; only a claim waits for the old lease; and no function
removes a store object until removal brings its own lease re-check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:41:40 -08:00
pingqiuandClaude Opus 5.5 99c6a50749 layout: the Commit transition
Commit ends a snapshot session: for the holder at HEAD's epoch with
snap(session) open, one conditional update sets the current root, the
position and an optional named snapshot and returns activity to idle.
Before it, every object the new root reaches must be written: the
chunks of this volume that are new against HEAD's current root, every
segment, and the root. The previous manifest must rebuild to HEAD's
current root, so what is new is checked, not trusted; unchanged and
foreign chunks are not looked up. A HEAD that already shows the commit
is a replay and nothing is written or looked up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:34:28 -08:00
pingqiuandClaude Opus 5.5 d75e385506 layout: the Abort transition
Abort moves activity snap(session) -> idle for the holder at HEAD's
epoch by one conditional update and changes nothing else; it is also
how a holder rolls back the session HEAD names after its own crash.
Abort over idle is a replay of a lost reply and writes nothing; another
open session or a cleaning is refused. Begin and Abort share one
read-apply-update path that refuses an absent HEAD.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:31:47 -08:00
pingqiuandClaude Opus 5.5 67b5f0184f layout: HEAD record and the Begin transition
HEAD is the volume's one mutable entry: epoch and holder, the open
transaction (activity idle, snap(session) or clean(session)), the current
root and position, and the named snapshots with their dependents (at
most 100). Its encoding is canonical JSON; decoding refuses unknown
fields and any bytes Encode would not write.

Begin moves activity idle -> snap(session) for the holder at HEAD's
epoch, by one conditional update on HEAD's generation. Begin of the
session already open is a replay and writes nothing; another open
session, a cleaning, another epoch or another holder is refused; an
absent HEAD is refused and never created.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 12:27:56 -08:00
Ping Qiu 346fd4bf1c Merge pull request #555 from seaweedfs/feat/oss-layout-pure
layout: content names, shard paths and manifest encodings
2026-11-24 11:58:00 -08:00
Ping Qiu 499663ad42 Merge pull request #554 from seaweedfs/docs/masterwait-single-master-store
docs: require one blockmaster per store
2026-11-24 11:50:40 -08:00
pingqiuandClaude Opus 5.5 75ec20ba7e layout: content names, shard paths and manifest encodings
A pure package for the content-named store layout: a chunk is named by
its index and the SHA-256 of its bytes and lives under
pool/<index/10000>/; a manifest is split into one segment per shard
(seg/<shard>-<sha256>) and a root naming them (root/<sha256>). Encodings
are canonical: decoding refuses any bytes Encode would not write, so an
object has one encoding and one name. Present and MissingOwn look names
up only: an entry that exists is complete, and a failed lookup is an
error, never absent. Nothing uses the package yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 11:48:46 -08:00
pingqiu 043df80794 docs: require one blockmaster per store 2026-11-24 11:43:02 -08:00
Ping Qiu cba3fae34a Merge pull request #535 from seaweedfs/fix/master-wait
fix: a workspace primary waits for an unreachable master instead of exiting
2026-11-24 11:25:13 -08:00
pingqiuandClaude Opus 5.5 fbcc89a5e6 docs: hosts' clocks stay within the clock-skew bound, or the lease bound does not hold
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 11:07:25 -08:00
Ping Qiu da5accc062 Merge pull request #552 from seaweedfs/test/head-readers
test: enumerate every HEAD reader and pin its absent-HEAD behaviour
2026-11-24 10:53:19 -08:00
Ping Qiu 9f98eb0e3b Merge pull request #550 from seaweedfs/test/interrupt-every-step
test: kill volume delete, fork and restore at every step and re-run
2026-11-24 10:46:06 -08:00
pingqiuandClaude Opus 5.5 5d0c9d8cec test: enumerate every HEAD reader and pin its absent-HEAD behaviour
A source scan lists every non-test function in core/ and cmd/ that reads
a volume's HEAD (ReadHead, GetHead, GetHeadRoot, getHeadRoot, headExists,
or a LookupEntry of HEAD) and fails when a reader is added or removed
without classifying it. Each reader names what it does when HEAD is
absent and the probe that pins it; readers that take an absent HEAD for
an empty one are marked GAP, so a change to that behaviour flips their
probes on purpose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 10:43:19 -08:00
pingqiuandClaude Opus 5.5 aec5d41c54 test: kill volume delete, fork and restore at every step and re-run
A trace-driven matrix: each command is run once through a recording
filer to enumerate its filer writes (its step boundaries); then for every
write it is killed before the write reaches the filer and after it
applied with its reply lost, the catalog restarted, and the command
re-run (twice) with the same request id. The end state and the data are
checked: the volume deleted and refused, or the fork's or restore's
image reading back byte for byte. A killed fork's copy intent may outlive
the replay; the test checks it is that request's and that the copy sweep
past the deadline settles it with the image intact. A step added to a
command is covered without editing the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 10:37:30 -08:00
Ping Qiu c7b8c0f78c Merge pull request #546 from seaweedfs/test/537-slow-precopy-budget-outcome
test(durable): accept bounded slow precopy readiness outcomes
2026-11-24 09:20:14 -08:00
Ping Qiu 7e3c720768 Merge pull request #545 from seaweedfs/test/537-takeover-attach-budget
test(durable): accept bounded takeover readiness refusal
2026-11-24 09:19:36 -08:00
Ping Qiu 06dabf547d Merge pull request #544 from seaweedfs/test/537-cold-precopy-loaded-context
test(durable): quarantine unresolved cold precopy accounting
2026-11-24 09:13:15 -08:00
pingqiu 44498a3ec8 test(durable): pin virtual post-pause expiry to its readiness allowance 2026-11-24 08:39:07 -08:00
pingqiu 7b67e49c3a test(durable): release timely takeover before its own CAS allowance 2026-11-24 08:36:47 -08:00
pingqiu ebf49b4ee9 test(durable): drive virtual attachment through real takeover provider 2026-11-24 08:36:21 -08:00
pingqiu 4601a076e0 test(durable): require deterministic precopy write readiness outcomes 2026-11-24 08:35:24 -08:00
pingqiu a8a2c0b66d test(durable): diagnose missing readiness registration 2026-11-24 08:34:45 -08:00
pingqiu 1c9364e6e0 test(durable): require both attachment budget outcomes on virtual time 2026-11-24 08:33:40 -08:00
pingqiu e7d18a3b6a Merge branch 'test/537-cold-precopy-loaded-context' into test/537-slow-precopy-budget-outcome 2026-11-24 08:17:11 -08:00
pingqiu cd24230842 test(durable): limit precopy quarantine to unresolved cold fixture 2026-11-24 08:16:20 -08:00
pingqiu 5b80c97457 test(durable): cover readiness budget before caller expiry 2026-11-24 08:09:58 -08:00
pingqiu 44873969bd test(durable): distinguish slow precopy caller-budget busy outcome 2026-11-24 08:01:14 -08:00
pingqiu ee67149b11 test: snapshot caller error before reading freeze diagnostics 2026-11-24 08:01:13 -08:00
pingqiu 602e677a8b test: report pre-copy guest error operation and stop timing 2026-11-24 08:01:13 -08:00
pingqiu f13f00d1c8 test(durable): quarantine unresolved precopy accounting and admission 2026-11-24 07:48:14 -08:00
Ping Qiu 22766070d6 Merge pull request #543 from seaweedfs/test/537-csi-loaded-publish-wait
test: allow CSI publish observation after loaded recovery
2026-11-24 07:45:02 -08:00
Ping Qiu 5c24447069 Merge pull request #542 from seaweedfs/test/537-cow-capture-loaded-context
test: allow COW capture context to cover loaded WAL churn
2026-11-24 07:44:34 -08:00
pingqiu 9380992a66 test(durable): avoid assuming delayed CAS prevents HEAD settlement 2026-11-24 07:44:05 -08:00