Commit Graph
3468 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 d11c418451 ci: build sametokens once and tell a failed check from differing tokens
Review fold. The check ran the tool with go run, which takes the .go
arguments as more source files, so in CI every DOCS PR touching Go would
have been refused; the self-test hid it by building the tool itself. The
check now builds the tool into a temporary directory, the self-test runs
that same path, and a build or tool failure exits 2 (the check did not
run) instead of reporting changed tokens. In a file that uses cgo every
comment counts (the grouped import ("C") form dropped the preamble).
The template says DOCS may still change contract text, with the reviewer
as the gate; the script header names the go:embed limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 00:25:13 -08:00
pingqiuandClaude Opus 5.5 46db22aa42 ci: kind DOCS compares Go tokens, not lines; CI covers .github/ only
Review fold. The line-multiset comparison let reordered statements,
directive comments (//go:build, //go:linkname, the cgo preamble), a //
inside a string after a rune quote, a line inside a multi-line raw
string and spacing inside a string all pass as comment-only. A small Go
program (sametokens.go, go/scanner) now requires the old and new token
sequences of each changed non-test Go file to be identical, comments
dropped except directives and the cgo preamble; gofmt realignment passes
by construction. The workflow passes old/new blobs instead of a diff.
DOCS no longer covers docs/spec (the models); CI no longer covers
scripts/, which holds shipped install and deploy scripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 00:16:40 -08:00
Ping Qiu c2ba8e69f4 Merge pull request #335 from seaweedfs/fix/precopy-resume-admission
durable: release the full admission queue when precopy resumes
2026-11-21 00:01:27 -08:00
pingqiuandClaude Opus 5.5 1ef1326866 sw-block: start-check comments describe the behaviour only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:58:32 -08:00
pingqiuandClaude Opus 5.5 b846b3ada4 blockvolume: test comment describes the behaviour only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:58:09 -08:00
pingqiuandClaude Opus 5.5 1192866f2e volume: barrierOverBound comment describes the field only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:57:56 -08:00
pingqiuandClaude Opus 5.5 49fdfc52b4 ci: spec-trace accepts DOCS, TEST and CI kinds, each checked against its files
A PR that changes no behaviour names one of three kinds instead of
IMPL, FIX or CHANGE. TEST may touch only tests, testdata and test
helpers; CI only .github/ and scripts/; DOCS docs, tests and Go whose
hunks change only comments. For DOCS the workflow passes the diff of the
non-test Go files, and the check compares removed and added lines with
line comments (outside strings) and spacing dropped; every changed Go
file must appear in that diff. Ten self-test cases added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:56:34 -08:00
pingqiuandClaude Fable 5.2 732941ff5a chunkstore: verify: only a usable closing read completes a pass; one segment object per key
A closing read of HEAD that finds no HEAD, or one that does not decode,
leaves the final view without a HEAD root and the result incomplete
(head_absent, head_invalid); it no longer keeps the earlier view. A
manifest segment is checked once per owner and key with one outcome, like
a chunk; a root whose reference does not match the content gets one
mismatch, and segment findings follow the one-per-key-and-class rule
under the first root that names the key.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 23:40:31 -08:00
pingqiuandClaude Opus 5.5 9ab17cef81 status schema: every registered /status route is covered
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:37:22 -08:00
pingqiuandClaude Opus 5.5 746a50e44b status schema: storage and latency field comments; every status field documented
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:37:07 -08:00
pingqiuandClaude Opus 5.5 23c23b72aa status schema: durable volume, chunk and write profile field comments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:35:28 -08:00
pingqiuandClaude Opus 5.5 3166854cbe blockvolume: delete --chunk-dirty-threshold outright (pre-GA); a unit passing it fails at start
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:30:20 -08:00
pingqiu 4e15c42559 merge main while retaining FIFO admission and frozen validation invariants 2026-11-20 23:29:10 -08:00
pingqiu ad30b9f023 docs(invariants): shorten precopy statement and retain details in notes 2026-11-20 23:27:12 -08:00
pingqiuandClaude Opus 5.5 c5478a990f sw-block: the single-filer start check runs within the command's --timeout
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:27:09 -08:00
pingqiuandClaude Opus 5.5 671a5eebc8 status schema: NVMe/TCP and ublk counter comments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:25:55 -08:00
pingqiuandClaude Opus 5.5 5184b1c119 storage: keep the re-own decisions out of captureLocked
The re-own candidates join through captureCandidates (addOwnCandidatesLocked)
and the HEAD-equal skip is a predicate (unchangedFromHead) in chunk_own.go:
captureLocked gains no branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:25:28 -08:00
pingqiuandClaude Opus 5.5 6fe5a9b17d status schema: replication peer, engine projection and chunk usage field comments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:25:11 -08:00
pingqiuandClaude Opus 5.5 c669f13950 status schema: host and frontend status field comments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:24:27 -08:00
pingqiuandClaude Opus 5.5 8a886ff6da restore: driver, /chunk/restore and sw-block ops chunk restore (part B)
The driver walks (64 MiB/s, BackgroundFill), cuts bounded batches (64 chunks)
until no foreign ref is left, then writes RESTORE-INDEPENDENT
(M6.Restore Restoring>Hydrating>Owning>Owning>Independent). It decides only
from the target's VOLUME, HEAD and marker, so a rerun resumes from the remote
state and a deleted source is a normal state. POST /chunk/restore starts or
joins one background run per volume and returns its status; GET (or
statusOnly) reports it; sw-block ops chunk restore calls it. Docs: M6 restore
rows, INV-RESTORE-OWN-BATCH-001 and INV-RESTORE-DRIVER-001, the restore
quantities, the workspace design diagram.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:23:16 -08:00
pingqiuandClaude Opus 5.5 29c81a1dca storage: OwnBatch bounded re-own cut and a byte-paced walker (restore part B)
OwnBatch(n, foreign) runs one ordinary cut whose candidates include up to n
local chunks whose HEAD keys name another volume; streamCutPayloads uploads
each under a new own key even when its bytes equal HEAD's, and the cut's one
intent and HEAD CAS publish them (M6.Restore.Owning>Owning). An absent chunk is
never fetched by a batch; with nothing to own no cut runs. HydrateAllAt paces
the walker to a byte rate before admission (HydrateAll = unpaced).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:23:16 -08:00
pingqiuandClaude Opus 5.5 46a7f6ad77 storage, volume: BarrierBound and barrierOverBound documented as legacy-fixture only; production stages by the copy-on-write budget
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:21:28 -08:00
pingqiu 8fb359c7a3 WIP status schema (O-OPS-2) 2026-11-20 23:21:08 -08:00
pingqiu b86dcf547d Merge remote-tracking branch 'origin/main' into feat/chunk-verify
# Conflicts:
#	docs/design/invariants.md
2026-11-20 23:20:30 -08:00
pingqiuandClaude Opus 5.5 d49b5c5fca invariants: condense the two new statement cells to 300 characters; detail in the notes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:18:58 -08:00
Ping Qiu f460eea977 Merge pull request #334 from seaweedfs/ci/spec-trace-check
ci: spec-trace check on every PR description
2026-11-20 23:18:41 -08:00
pingqiuandClaude Opus 5.5 e3a06ab435 invariants: INV-WS-SINGLE-FILER-001 names the ops chunk enforcement and its test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:18:09 -08:00
pingqiuandClaude Fable 5.2 a4c0ccbdde chunkstore: verify: compute findings once, from chunk outcomes and the final view
The pass kept three kinds of state: a chunk (unseen, queued, settled with
one outcome, never re-checked), the HEAD view (replaced by each refresh)
and each selected snapshot's view. Settling a chunk records its outcome
and reports nothing. The pass closes on a read of HEAD and of the
snapshots' state that names no unseen key; that same read is the final
view. Findings are computed once, from the outcomes and the final view:
at most one per chunk key and class, under the first root that names the
key; a bad chunk that no root names is counted, not reported. A key the
pass saw named, then not named, then named again is reported. If the
closing rounds run out the result is incomplete, never clean.

This replaces the reporting done as reads settled and as refreshes
arrived, together with the late-reference list and the per-finding
rechecks.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 23:16:15 -08:00
pingqiuandClaude Opus 5.5 0ef32a75c7 sw-block: ops chunk commands that write chunk metadata run the single-filer start check (O-ENG-4)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:15:00 -08:00
pingqiu a945582e23 Merge remote-tracking branch 'origin/main' into docs/invariants-one-contract
# Conflicts:
#	docs/design/invariants.md
2026-11-20 23:10:35 -08:00
pingqiuandClaude Opus 5.5 f676da0424 docs: condense INV-SNAP-DELETE-ANY-ORDER-001 (statement <= 300 chars, detail in the notes)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:09:29 -08:00
pingqiuandClaude Opus 5.5 6687234a0d blockvolume: --chunk-dirty-threshold is deprecated and ignored (cuts stage by the copy-on-write budget); warn at start, removal after 2027-01-31
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 23:09:00 -08:00
pingqiu e8fe683a3e fix(durable): retry only precopy pause refusals and bound test handshakes 2026-11-20 23:04:30 -08:00
pingqiu 08c0afb1e9 test(durable): retain stale admission errors when a new pause starts 2026-11-20 23:03:38 -08:00
Ping Qiu ca2069ce25 Merge pull request #336 from seaweedfs/train/20261121-7
train 7: restore PR A, typed frozen refusal, GC clock skew, public-text cleanup
2026-11-20 23:01:57 -08:00
pingqiuandClaude Opus 5.5 acc1258015 chunkstore: snapshot delete in any order with forks (remove fork claims)
A fork or restore no longer claims its parent snapshot, and neither
DeleteSnapshot nor retention reads a claim: a deadline-exceeded fork or a
failed restore can no longer make its parent (and so its volume) undeletable.

Safety now rests on time: a fork takes its deadline start before it reads the
parent, every attempt (a retry included) reads it again, and it publishes its
HEAD only before start + operation deadline; GC keeps a deleted attempt rooted
for its grace, and NewCollector now requires
grace >= operation deadline + clock skew + CAS apply bound (new GCConfig
field, default: the operation deadline). An unknown publish keeps the fork
intent, which roots the keys until the target is resolved.

Removed: claimForkParent/dropForkClaim/removeForkClaim (replaced by
readForkParent), the claim branch of markDeleting, liveClaims, claimedErr and
snapshot_claimed, retention's ForkHeld outcome and the fork_parent keep
(forkParentsNeeded). A claims xattr written by an older version is ignored.

Tests: three new tests (fork retry after delete re-reads the parent; delete
during a fork in flight; unknown publish keeps the keys while its intent
exists), each red on the base with snapshot_claimed; the construction check
with its boundary; claim-mechanics tests removed, the others rewritten to the
new rule. Docs: invariants.md M6 rows, INV-SNAP-DELETE-ANY-ORDER-001 (new),
INV-SNAP-EXPLICIT-DELETE-001 and INV-GC-GRACE-DEADLINE-001 restated,
INV-RESTORE-PARENT-HOLD-001 archived; workspace design section 6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 22:56:53 -08:00
pingqiuandClaude Opus 5.5 8e3e8d1bcb ci: spec-trace runs on the self-hosted runners for same-repository PRs
GitHub-hosted jobs in this org can queue for a long time; the test
workflow already sends same-repository PRs to the self-hosted runners and
forks to a hosted one. The spec-trace job does the same. It runs no PR
code on either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 22:41:48 -08:00
pingqiu adcc5a773c Merge branch 'p329' into train/20261121-7 2026-11-20 22:33:30 -08:00
pingqiu 3ae278e117 Merge branch 'p328' into train/20261121-7
# Conflicts:
#	docs/design/invariants.md
2026-11-20 22:33:26 -08:00
pingqiu c717f87a35 Merge branch 'p330' into train/20261121-7
# Conflicts:
#	docs/design/invariants.md
2026-11-20 22:32:57 -08:00
pingqiu 6342c41f5b Merge branch 'p326' into train/20261121-7 2026-11-20 22:32:17 -08:00
pingqiu 2646ee62a3 merge main into GC grace and rejected delete fixes 2026-11-20 22:28:17 -08:00
pingqiu 00372334d7 merge main into frozen detach validation classification 2026-11-20 22:27:05 -08:00
pingqiuandClaude Opus 5.5 6c45c50245 Merge origin/main 9da65c98 (Train 6) into feat/oss-independent-restore
Conflicts kept both sides: agent-workspace-design.md (restore diagram, then
attached-volume scheduling); invariants.md B.6 (the INV-MAINT-* rows, then the
INV-GC-REACHABLE-001 row with restore owner rooting). Part B summary recounted
from the tables: 131 rows, 112 ACTIVE, 17 STUB, 2 ARCHIVED, 116 new.
RestoreIndependence is now exhausted (breadth-first, complete graph): the spec
README row and the invariant rows drop the simulation tags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 22:24:34 -08:00
pingqiu 2cbb5d7d98 Merge remote-tracking branch 'origin/main' into feat/chunk-verify
# Conflicts:
#	docs/design/invariants.md
2026-11-20 22:20:11 -08:00
pingqiuandClaude Fable 5.2 3fed158179 chunkstore: verify: a chunk's outcome applies to every reference to it
A miss or a read error was reported against the references known when the
chunk was queued. A reference added by a HEAD refresh, before or after the
read ended, is now given the same outcome under the usual recheck, without
reading the chunk again. Tests that hold a call open get an independent
bound so a broken implementation fails instead of hanging.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 22:17:31 -08:00
pingqiu 542ed01df3 fix(durable): requeue granted commands when a new pause wins admission 2026-11-20 22:17:14 -08:00
pingqiu 325973e745 test(durable): witness a new pause overtaking granted I/O 2026-11-20 22:16:23 -08:00
pingqiu 2f906474ed fix(durable): apply the ruled FIFO grant and caller deadline boundary 2026-11-20 22:15:19 -08:00
pingqiu 8687b03c92 fix(durable): settle queued grant versus expiry under the admission lock 2026-11-20 22:11:00 -08:00