Commit Graph
1566 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 385ad024f4 test: #262 fold: one test-clock transaction per Now/Freeze/Resume; failure exits on the hold waits
Review fold (codex01, test only): the frozen check, time.Now and the offset
were separate reads, so a reader paused across freeze+release could see the
clock go backwards. leaseTestClock serializes Now/Freeze/Resume/SetOffset
under one mutex and never returns an earlier time than a previous Now.
TestLeaseTestClockMonotonicAcrossFreezeResume runs readers across 50
freeze/resume transitions. The held-entered and under-hold progress waits
get 30 s real-time failure exits (never a pass); the cleanup releases the
hold and joins every worker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 06:26:37 -08:00
pingqiuandClaude Opus 5.5 6a063f2ec8 test: freeze the publisher clock while the extension write is held (#247 hang)
TestWorkspaceLeaseConcurrentRenewalsWritersExtendersClose hung ~9m40s in a
loaded qual run (goroutine dump: one extender held in the store hook, four
queued on p.mu, renewers looping, the test in the progress loop). Cause: a
test bug. The test's publisher clock was real time with a 2 s TTL; while the
held extension write holds p.mu no horizon can move, so a late test
goroutine let horizons expire, renewals were refused, and the progress
condition (a grant under the hold for every eligible volume) could never
hold. Not a product stall: renewals never waited for the store.

The clock is now frozen while the extension write is held and resumes from
the frozen instant at the release (no jump over a horizon), so extensions
again run in real time alongside the writers and Close. A 3.5 s late test
goroutine after the hold is now part of the test; without the freeze it
fails ('revoke ACK: lease expired').

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 05:44:54 -08:00
Ping Qiu be320d34c5 Merge pull request #238 from seaweedfs/fix/cut-single-upload-retry
storage: retry individual cut uploads within a shared deadline
2026-11-19 05:19:26 -08:00
Ping Qiu 0a645f2121 Merge pull request #248 from seaweedfs/fix/chunk-authority-wait-logs
durable: log the chunk authority wait, the HEAD claim and the seed stages
2026-11-19 04:03:23 -08:00
Ping Qiu 6e385d4774 Merge branch 'main' into fix/cut-single-upload-retry 2026-11-19 03:33:49 -08:00
Ping Qiu 532be33feb Merge branch 'main' into fix/chunk-authority-wait-logs 2026-11-19 03:05:01 -08:00
Ping Qiu 7dc34b0197 Merge pull request #254 from seaweedfs/test/dtb-b1-exited-holder
master: test the exited-holder recovery path (forced move, then delete)
2026-11-19 02:56:48 -08:00
Ping Qiu 21c66a1c21 Merge pull request #231 from seaweedfs/fix/volume-create-capacity-limit
volume: refuse creation above 16 TiB minus 4 KiB
2026-11-19 01:54:40 -08:00
pingqiuandClaude Opus 5.5 966384d2a8 master: give the exited-holder test room after the lease horizon
The test waits out the real ~45 s horizon; a 60 s budget left ~15 s for
the takeover, cut, detach and delete, which load and -race exceeded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 01:48:55 -08:00
pingqiuandClaude Opus 5.5 898c0fd046 master: test the exited-holder recovery path (forced move, then delete)
A holder that exits never detaches or ACKs, so its live authority keeps
a volume delete refused. The existing path recovers it: after the lease
horizon plus skew a forced move grants epoch+1 on another host, which
claims HEAD, serves the last cut and writes past it, then detaches with
a clean ACK, after which the delete is admitted and later renewals and
moves are refused. Real master runtime and providers, in-memory remote.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 01:48:55 -08:00
Ping Qiu a6ff3002fd Merge pull request #232 from seaweedfs/fix/detach-abort-resume
durable: a failed detach never leaves the guest frozen (MIGRATION E4)
2026-11-19 01:40:46 -08:00
Ping Qiu f353f605c1 Merge pull request #247 from seaweedfs/test/227-lease
test: workspace-lease family waits by progress, not wall-clock bounds (#227)
2026-11-19 01:07:33 -08:00
Ping Qiu 4c9714b49b Merge pull request #244 from seaweedfs/fix/lease-refusal-race
authority: read the lease view under leaseMu in the renewal refusal (#242)
2026-11-19 00:50:19 -08:00
pingqiu d9e5f7c9fa fix: bound individual upload retries without timing out whole cuts 2026-11-19 00:42:23 -08:00
pingqiu 608046e6cb fix: refuse missing open-only volumes before fresh sidecars 2026-11-19 00:33:10 -08:00
pingqiu aea5f5d88b test: observe mixed-arm counts before the generic overwrite oracle 2026-11-19 00:15:38 -08:00
pingqiuandClaude Opus 5.5 a5ae7fb0d3 durable: seed log outside the store locks; log every claim outcome
Fold of the #248 review:
- the v3 seed logs after the capture and lifecycle locks are released,
  and names its intervals for what they include (lock wait, store mutex
  and validation, data sync incl. sync serialization, checkpoint publish);
- the HEAD claim logs its start before the claim's own HEAD read and its
  elapsed time on failure; the observed HEAD is logged as an observation;
- a close during the attach retry backoff ends the wait as closed, not
  superseded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 00:07:59 -08:00
pingqiu 42d30e0627 test: retire BASE begin hook before completion transition 2026-11-19 00:04:46 -08:00
pingqiuandClaude Opus 5.5 7116f6dbf8 test: #247 review fold: release before join; credit only renewals started under the hold
- master slow store: each held Put takes a generation; a renewal is credited
  with the generation it read before its call, so a reply computed before
  the hold never releases it. slow.release() runs as the first cleanup, so a
  held Put cannot block the publisher/extender joins after a failure.
- authority WritersExtendersClose: only grants of calls that started after
  the extension write was held count (flag set before the hold blocks).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 00:02:05 -08:00
pingqiu 953d2795b8 test: qualify BASE waiting behind an interrupted upload 2026-11-19 00:01:02 -08:00
pingqiu d67368a989 fix: shorten shared cut retry budget and bound test worker cleanup 2026-11-18 23:59:12 -08:00
pingqiu 9536ab0dd2 test: bound shared staged cut budget and ordinary write progress 2026-11-18 23:57:51 -08:00
pingqiu 3579e6dd42 test: distinguish successful key from failed upload retry 2026-11-18 23:56:33 -08:00
pingqiuandClaude Opus 5.5 9f46fb8d7d test: workspace-lease family waits by progress, not wall-clock bounds (#227)
- core/host/master TestWorkspaceLeaseGuardSurvivesSlowAuthorityStore: each
  lease write is held until a renewal succeeded during the hold (slowness by
  progress), three held writes must complete, a sampler records any fence;
  replaces the 2.5 s sleeps and the 10 s watch. A renewal that waited for the
  store would let the guard lapse and fail the test at once.
- TestWorkspaceHeldRenewalBoundary, TestWorkspaceMoveRestoresLazilyAndFencesOldHost:
  the test context has no wall-clock bound (3 s / 10 s); each step completes
  or the go test timeout reports the hang. The guard's own RPC timeout stays.
- core/authority TestWorkspaceLeaseConcurrentRenewalsWritersExtendersClose:
  wait for the held extension write and for renewals under it by progress
  (were 5 s / 2 s bounds); joins after release unchanged.
- waitExtenders joins the finite extenders without a 10 s bound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 23:41:12 -08:00
pingqiu 4055e403ea test: cover open-only geometry and disappearance race 2026-11-18 23:38:06 -08:00
pingqiu d102a1c1a3 fix: admit geometry only when creating durable storage 2026-11-18 23:37:14 -08:00
pingqiu 1e5fe198e3 test: preserve existing-volume create-geometry compatibility 2026-11-18 23:36:38 -08:00
Ping Qiu 325c7555f7 Merge pull request #230 from seaweedfs/fix/manifest-base-group-scan
chunkstore: partition base references once for manifest preparation
2026-11-18 23:34:57 -08:00
pingqiuandClaude Opus 5.5 f99db46603 durable: log the chunk authority wait, the HEAD claim and the seed stages
A deferred chunk attach was silent from the end of local recovery until
it served or failed. Log:
- entering the authority wait, with the projection fields that fail;
- the first attach attempt, once the projection carries authority;
- an attach that found authority gone again;
- the HEAD claim start (observed HEAD gen/epoch/holder/state/remote LSN
  and the target epoch/holder) and its end with the duration;
- how the wait ended (attached after N attempts, fenced, closed,
  superseded, or assignment unavailable with the fields still missing);
- the v3 seed's lock wait, data fsync and checkpoint publish durations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 23:29:38 -08:00
pingqiu a9a2cfa936 style: group create-admission imports 2026-11-18 23:10:20 -08:00
pingqiu 9e809120f4 fix: admit original geometry before every durable create 2026-11-18 23:08:47 -08:00
pingqiu c4a37fd4a0 test: cover create admission callers and legacy retry 2026-11-18 23:07:15 -08:00
pingqiuandClaude Opus 5.5 01a118036f authority: read the lease view under leaseMu in the renewal refusal (#242)
The no-host-validity refusal in RenewWorkspaceLease formatted its error
from lv.d.horizon after releasing leaseMu, while the extender
(refreshLeaseViewLocked) rewrites the view under leaseMu: a data race.
The horizon is now read before the unlock.

Test: TestWorkspaceLeaseRefusalReadsTheViewUnderTheLock drives the
refusal while the view is republished concurrently; under -race it fails
on main (workspace_lease_view.go:174) and passes here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 23:00:20 -08:00
pingqiu 19195503eb chore: keep public PR changes to implementation and tests 2026-11-18 22:57:17 -08:00
pingqiu 254f6ba7ee chore: keep public PR changes to implementation and tests 2026-11-18 22:57:12 -08:00
pingqiu 6de4d89a98 chore: keep public PR changes to implementation and tests 2026-11-18 22:57:06 -08:00
pingqiu bdeb3faf5e docs(geometry): state the block-size assumption behind the byte cap 2026-11-18 22:29:44 -08:00
pingqiu 62813dc9a8 test(storage): exercise upload retries beyond the WAL with periodic flushes 2026-11-18 22:23:37 -08:00
pingqiu b47b40fadf storage: retain the remote cause when a retry budget ends 2026-11-18 22:20:47 -08:00
pingqiu 92f172006a docs: record bounded cut-upload retry and unchanged publication guards 2026-11-18 22:18:34 -08:00
Ping Qiu 367617c14b Merge pull request #222 from seaweedfs/fix/v3-local-pressure-sync
fix: reclaim native WAL under pressure without guest Flush
2026-11-18 22:15:34 -08:00
pingqiu a9d24e4256 storage: resolve lost upload replies before bounded single-object retries 2026-11-18 22:14:03 -08:00
pingqiu dfffdd8088 test(storage): cut upload retry, ambiguous completion and cancellation 2026-11-18 22:12:13 -08:00
pingqiuandClaude Opus 5.5 0a35653775 docs: keep the detach invariant rows off the public PR (archived on the share)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 22:09:41 -08:00
pingqiuandClaude Opus 5.5 89f0ca8b30 durable: detach review fold 2: forced failed-drain branch, recorded deadlines, handshakes, mapping order, invariants
- Test-only hooks: DetachVolume's StopIO can be replaced (the repeat and
  retry tests now force and observe the failed-drain branch instead of
  racing a cancelled context against a finished drain); the detach's cut
  and settlement deadlines are traced (the budget test checks 3/4 of the
  freeze, then the bound); the backend signals an I/O passing its
  readiness check right before the I/O lock (the drain test's arrival
  handshake replaces a 100 ms non-completion window, with bounded
  receives).
- The delayed detach CAS worker is joined, bounded, also on failure.
- chunkErrorCode: the detach sentinels decide before a catalog-error
  cause; the table rows now discriminate that order (no storage CAS
  sentinel behind them).
- Invariants: INV-WS-DETACH-ABORT-001 and INV-WS-DETACH-FREEZE-001, and
  the M4 transition Holder (detaching) -> Holder.
- Mutants (declared, 10/10): plus a catalog cause deciding before the
  sentinels; the whole-budget cut is now caught by the deadline check too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 21:52:14 -08:00
pingqiu ebe1b0bd13 test: include reproducible manifest scaling qualification checker 2026-11-18 21:50:16 -08:00
pingqiu f9d9efc418 test(chunkstore): observe refused fork claims through snapshot deletion 2026-11-18 21:42:06 -08:00
pingqiu 5892e35217 fix(chunkstore): refuse oversized inherited fork geometry before claiming 2026-11-18 21:36:07 -08:00
pingqiu 1afc5ac00b test: correct fork capacity fixture lookup error binding 2026-11-18 21:31:34 -08:00
pingqiuandClaude Opus 5.5 f9a8b5daab durable: detach review fold: settle every failure before resuming; one freeze budget
- P1: every failed detach is settled before anything resumes, a failed
  drain included. A repeated detach after a successful one (or with a
  cancelled context) returns the first result and stays stopped, and a
  retry over an unresolved detach CAS stays stopped while the outcome is
  unknown. The StopIO failure path used to resume unconditionally.
- P1: one freeze budget covers the drain, the final cut and the
  settlement (the cut gets three quarters, the settlement the rest); the
  settlement no longer adds 10 s of its own. The bound is cooperative
  (contexts), as documented.
- P2: the resume does not restart the periodic cuts after a concurrent
  Close (or a replaced layer); ErrDetachOutcomeUnknown maps to
  outcome_unknown explicitly, before its cause.
- Tests: the two P1 cases and the budget case (red on 26426dd5: resumed a
  detached volume, resumed over an unknown CAS, 10.4 s for a 400 ms bound);
  a detach CAS genuinely delayed until after the cancel then fails its
  precondition; the drain test now checks that the resumed write queues
  behind the admitted one and that recovery succeeds.
- Mutants (declared, 9/9): plus a failed StopIO resuming without the
  settle, the settlement with time of its own, the cut taking the whole
  budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 21:30:54 -08:00