Commit Graph
2184 Commits
Author SHA1 Message Date
pingqiu 1002f66cf5 Merge remote-tracking branch 'origin/main' into feat/chunk-verify 2026-11-21 00:31:24 -08:00
pingqiuandClaude Fable 5.2 635cf50c16 chunkstore: verify: judge each reference against the object's one outcome, at the end
Nothing is stored about a reference except that a root carried it. An
object (a chunk or a manifest segment, by owner and key) has one outcome
from its one check; whether a reference to it is sound is a pure function
of that outcome and the reference, so the findings no longer depend on
which reference was seen first. An object that had a problem under any
reference seen and yields no finding is counted once.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-21 00:27:27 -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 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
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
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
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 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
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 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
pingqiu 2931222f0c test(durable): witness resumed queue grant versus deadline expiry 2026-11-20 22:09:58 -08:00
pingqiu 1f8072da0c fix(durable): bound queued commands from their arrival and witness FIFO grants 2026-11-20 22:09:58 -08:00
pingqiu 8175e6fa84 test(durable): bound paused commands from their own arrival 2026-11-20 22:04:45 -08:00
Ping Qiu 9da65c9802 Merge pull request #327 from seaweedfs/train/20261121-6
Train 6: #318 + #320
2026-11-20 22:01:39 -08:00
pingqiuandClaude Fable 5.2 e8f325dedc chunkstore, sw-block: verify: bind rechecks to the lookup identity, confirm absence freshly, bound the start check
- A failed refresh cancels reads in progress before joining them and is
  the error returned.
- A reference to a chunk already read is compared with that content; two
  references to one key that disagree are a finding.
- A snapshot is identified by the name it was looked up by; a document
  naming another snapshot or volume is ROOT_INVALID and excuses no miss.
- The single-filer check of every ops chunk command runs within the
  command's --timeout.
- SWFS.Get reports not found only after a fresh volume lookup whose every
  location answers 404; a warm, correct cache costs no extra lookup.
- The verify rows move to Part B of the invariant document.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 21:59:34 -08:00
pingqiu 432b057856 fix(durable): release all admission waiters when precopy resumes 2026-11-20 21:58:51 -08:00
pingqiuandClaude Opus 5.5 3065a81238 ci: spec-trace check refuses a trace line declared twice
A second Machine/INV line (plain, list or bold form) could carry a second
kind past the check; every trace key must now be declared once. Three
self-test cases added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 21:56:31 -08:00
pingqiu f8d5a96905 test(durable): witness serving admission after precopy resume 2026-11-20 21:56:28 -08:00
pingqiuandClaude Opus 5.5 8dd3669b1d ci: spec-trace check refuses mixed kinds, placeholders and cut-off change lists
Review fold: Machine/INV must carry exactly one kind token that ends at a
space, comma, slash or the line end; trace keys count only at the start of
a line; a value still holding the template placeholder fails; deleting
non-test Go under core/ or cmd/ also needs Simplest; an unknown status or a
record cut off before its NUL is a malformed change list (exit 2). The
self-test grows to 31 cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 21:53:15 -08:00
pingqiuandClaude Opus 5.5 e82d04f5ac ci: spec-trace check on every PR description
The PR template now carries the five trace lines (Feature, Machine/INV,
Model, Red-first, Simplest). A pull_request_target workflow checks the
description from the base branch's script: the four trace lines are
present, NONE carries a reason, Machine/INV starts with the PR kind
(IMPL <machine>.<transition>, FIX <INV-ID> or CHANGE <machine>), and
Simplest is present when non-test Go under core/ or cmd/ changes.
The self-test runs before the check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 21:46:13 -08:00
pingqiuandClaude Opus 5.5 24bc9ecfde chunkstore: dropIntent test asserts a live, self-bounded delete context
The test now checks that the context the filer receives is live on entry (it
does not inherit the caller's cancellation) and ends with its own deadline
(context.DeadlineExceeded), not Canceled. Release and bounded join at cleanup
are kept. Mutants: inheriting the cancelled parent fails on entry; no deadline
fails on the deadline check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 20:59:05 -08:00
pingqiu 461c471edf fix: restore final invalid_freeze_budget wire name 2026-11-20 20:52:22 -08:00
pingqiuandClaude Opus 5.5 dff8c712b3 restore: bound the synchronous walker tests, join the dropIntent worker, ledger rows
- Walker tests that call HydrateAll synchronously run under a ctLocalBound
  timeout, so a walker that never finishes fails instead of hanging.
- The dropIntent test releases and joins its worker at cleanup (an unbounded
  delete, the failing case, no longer leaks a goroutine).
- invariants.md: INV-RESTORE-PARENT-HOLD-001 is Go only (the model does not
  cover retention of an aborted target); new INV-CAT-INTENT-DROP-BOUNDED-001
  row and M6 transition for the bounded catalog intent delete.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 20:49:42 -08:00
pingqiu 7a118ff151 fix: use invalid_freeze_request and trace typed refusal invariant 2026-11-20 20:47:27 -08:00
pingqiu 8bd05b6cda test: require canonical invalid_freeze_request wire code 2026-11-20 20:46:44 -08:00
pingqiu c190ec15d0 fix: distinguish pre-mutation frozen detach validation refusals 2026-11-20 20:43:05 -08:00
pingqiu 125ed96eb0 test: require distinct pre-mutation frozen validation refusal 2026-11-20 20:42:39 -08:00
pingqiuandClaude Opus 5.5 f679f2a5fe docs: drop internal names and paths from comments and notes
Public text states what the code guarantees, not who asked for it or
where an internal note lives. Comments and docs only; no code change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 20:37:43 -08:00
pingqiuandClaude Opus 5.5 6d42d08b0f restore: public comments state guarantees only; walker test allows a deferral
Comments in the restore code, tests and spec header now say what the code
guarantees, without review or design-note references. The real-limiter walker
test no longer asserts zero deferrals: a permit is released asynchronously
(when its flight settles, then closed by the limiter), so the next admission
can find every fill slot still closing; it now requires the limiter's skips to
equal the walker's deferrals (flaked 4 of 90 runs on Linux before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 20:36:33 -08:00
pingqiu b9c11477b7 fix: isolate permanent GC DELETE refusals without losing coverage 2026-11-20 20:35:19 -08:00
pingqiu a3a3bc0a23 test: expose permanent DELETE starving later GC bindings 2026-11-20 20:32:04 -08:00
pingqiu c2cac1159d docs: clarify GC pairwise clock assumption 2026-11-20 20:29:23 -08:00
pingqiu d075dc6011 fix: preserve GC grace across bounded clock skew 2026-11-20 20:27:22 -08:00
pingqiuandClaude Opus 5.5 a802e6db68 Merge #320 (forced-move CLI + lost-range readout) into train 6
The only conflict is the ledger summary line in docs/design/invariants.md,
which #318 and #320 both recounted. Recounted from the merged Part B tables:
126 rows (107 ACTIVE, 17 STUB, 2 ARCHIVED; 15 kept, 111 new).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 20:25:15 -08:00