Commit Graph
1625 Commits
Author SHA1 Message Date
pingqiu 4bee2d1192 docs: record recovery-bounded cut birth invariant and regression 2026-11-19 13:46:33 -08:00
pingqiu 4e53dbcb36 docs: clarify conservative map birth and captured frontier 2026-11-19 13:36:59 -08:00
pingqiu 29b3d2a30d fix: bound conservative chunk birth by captured image frontier 2026-11-19 13:35:58 -08:00
pingqiu fa32ab5b32 test: reproduce conservative chunk birth after dropped WAL suffix 2026-11-19 12:19:16 -08:00
Ping Qiu 6644ff78b7 Merge branch 'main' into feat/chunk-manifest-format3 2026-11-19 08:14:06 -08:00
Ping Qiu f1abb01a20 Merge pull request #262 from seaweedfs/test/247-hold-clock
test: freeze the publisher clock while the extension write is held (#247 hang)
2026-11-19 08:13:38 -08:00
pingqiuandClaude Opus 5.5 4f5be014ca test: #262 under-hold oracle with witnessed headroom; set-up and revoke/ACK on a frozen clock
- The extension write is held only when every eligible volume (and the
  clean volume) has positive host validity at the frozen instant, read from
  its own renewal view; under the hold every renewal started before the
  writers must grant (any refusal fails).
- The clock is frozen through the set-up binds (fsync writes could outlast
  a TTL and expire the first-bound volume before its renewer started) and
  from the hold until the clean volume's revoke ACK (queued behind every
  extension write); it then resumes from the frozen instant.
- The clock unit test registers stop + a bounded join before its readers
  start, so every exit settles them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 07:42:29 -08:00
Ping Qiu b7af4c8e8c Merge pull request #260 from seaweedfs/fix/move-refusal-reasons
master: name a refused move's precondition; allow any port on the target host
2026-11-19 07:14:06 -08:00
Ping Qiu 9a0d432b6a Merge branch 'main' into feat/chunk-manifest-format3 2026-11-19 07:10:21 -08:00
Ping Qiu 4b5320f3ea Merge pull request #237 from seaweedfs/fix/chunkmap-bounded
fix(storage): bound the v3 owned-map file by reusing unreferenced extents
2026-11-19 07:08:03 -08:00
Ping Qiu 1747cdf9e1 Merge pull request #258 from seaweedfs/feat/dtb-b3-volume-unheld
storage, sw-block: prove locally that no process holds a volume
2026-11-19 06:37:59 -08:00
Ping Qiu 83b0878864 Merge pull request #229 from seaweedfs/fix/chunk-refuses-replication
blockvolume: refuse replication on a walstore-chunk volume (RF1 only)
2026-11-19 06:34:38 -08:00
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
Ping Qiu b783626889 Merge pull request #245 from seaweedfs/fix/chunk-dirty-threshold-help
blockvolume: correct the --chunk-dirty-threshold help text and comment
2026-11-19 05:59:07 -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
pingqiuandClaude Opus 5.5 ec40814443 master: validate a move target's endpoints; log a refusal outside the lock
Fold of the #260 review:
- the target endpoints get the binding endpoint rules before admission
  (host:port, numeric port 1..65535, data and ctrl distinct), without
  registering anything: a host match alone admitted ':0', ':65536', a
  non-numeric or empty port, or identical data and ctrl, and the move
  would have issued and cleared the source lease;
- host parts compare in canonical form (equivalent IP spellings);
- the refusal log runs after workspaceMu is released;
- the comment no longer calls the host match a proof; the invariants
  ledger gets the move-admission row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 05:34:16 -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
pingqiuandClaude Opus 5.5 d8c42d0928 master: a move target may use any port on the target node's host
A volume without per-volume bindings could move only to the target
node's single registered address pair, which models one slot per node: a
host serving several slots refused every move whose target landed on a
slot other than the registered one (slot 1 while slot 0 is held). The
target now needs both endpoints on the node's registered hosts (literal
host part, any port, no name resolution), and the existing collision
check still refuses endpoints another live assignment or binding owns.
Volumes with per-volume bindings keep the exact binding match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 04:57:41 -08:00
pingqiuandClaude Opus 5.5 e9aecf52dc master: name the precondition that refused a workspace move
MoveWorkspace refused four different conditions with one message and no
log line: an unknown source, an unregistered target node, a target that
is the source, and target endpoints that are not registered. Each now has
its own FailedPrecondition message, logged with the volume and request.
The endpoint refusal also says what is registered: the node's own pair
for a volume without per-volume bindings, else its live bindings on that
node (a slot-1 target on a node registered at slot 0 shows up here).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 04:42:38 -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
pingqiuandClaude Fable 5.2 9853ea8f10 Merge branch 'main' into fix/chunk-dirty-threshold-help
Resolve the conflict in the ProviderConfig comments: keep main's new DetachFreezeTimeout field and the corrected ChunkDirtyThreshold comment.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 03:06:52 -08:00
Ping Qiu fe3fe97489 Merge branch 'main' into fix/chunk-refuses-replication 2026-11-19 03:05:05 -08:00
Ping Qiu 532be33feb Merge branch 'main' into fix/chunk-authority-wait-logs 2026-11-19 03:05:01 -08:00
pingqiu 7cb0296158 fix(storage): preserve caller cancellation during claim intent retirement 2026-11-19 03:00:27 -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
pingqiuandClaude Opus 5.5 574c035e68 storage: gofmt the unheld probe test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 02:50:41 -08:00
pingqiuandClaude Opus 5.5 fcf5dc72d7 storage: decide unheld on one locked descriptor
Fold of the #258 review:
- the probe opens the volume once, locks that descriptor first, then
  identifies the same open file as v3: a path replaced between two opens
  can no longer yield a false unheld, and a locked file is held whatever
  it is;
- locking before reading also fixes Windows, where an owner's byte lock
  refused the probe's earlier read (it reported unknown, not held);
- the test reaps its holder process on every path; the CLI test closes
  its store unconditionally;
- the usage text adds that the probe is momentary and reserves nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 02:49:51 -08:00
pingqiu 2aebe5f044 test(chunkstore): refuse changed content at identical legacy frontier 2026-11-19 02:47:20 -08:00
pingqiu ae0f74cb16 test(storage): measure birth sampler maximum default geometry and lock wait 2026-11-19 02:44:05 -08:00
pingqiu 1a9dc60643 fix(chunkstore): upgrade legacy data callers and preserve fork identity 2026-11-19 02:42:46 -08:00
pingqiu b7856e4793 test(chunkstore): use fixture blob store 2026-11-19 02:41:22 -08:00
pingqiu 65f661ca44 test(chunkstore): exercise persisted legacy upgrade callers 2026-11-19 02:41:04 -08:00
pingqiuandClaude Opus 5.5 28f983bb4c storage, sw-block: prove locally that no process holds a volume
ProbeVolumeUnheld takes and releases the exclusive, nonblocking advisory
lock that every v3 owner holds while its store is open; the kernel drops
it when the owner process exits. nil means no process on this host holds
the volume; ErrVolumeHeld means one does; anything else is unknown (a
non-v3 file is refused: its owner would not take the lock).

`sw-block ops volume-unheld --path P` exits 0 only when unheld (1 held,
2 unknown). The proof is per host and for local filesystems only; host
cleanup must also check that the owner process is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 02:25:50 -08:00
pingqiuandClaude Opus 5.5 adf9b9e2a7 fix(storage): count a truncated map file before its fsync
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 02:18:28 -08:00
pingqiuandClaude Opus 5.5 bfd07d85cb docs(invariants): list the owned-map extent-reuse regressions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 02:18:28 -08:00
pingqiuandClaude Opus 5.5 3ffface62a fix(storage): keep map candidates pinned exactly while a slot may name them
A candidate prepared successfully and then refused because its proof
went stale during the prepare's I/O was left in flight until reopen;
both preparation paths now release it before returning
ErrMapCoverageStale.

A publication whose slot write and fsync succeeded but which a fault
latched meanwhile refuses at its success boundary may still be named by
the slot on disk. It is now recorded as uncertain, so its candidate
stays pinned until reopen instead of being released for reuse.

The map's file-size counter now follows every write and truncation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 02:18:28 -08:00
pingqiuandClaude Opus 5.5 042a201651 fix(storage): bound the v3 owned-map file by reusing unreferenced extents
New map pages and roots go into 4 KiB extents that no live root
references, lowest first, instead of always being appended. Live roots
are the roots named by the two descriptor slots and every prepared
candidate not yet published or superseded. After each publication the
publisher reports both slots; an extent is released only once neither
slot's root references it. New pages and the root are fsynced before a
publication names them. The free tail is truncated when the file
exceeds 4x the live bytes. The on-disk format is unchanged.

WALStore.ChunkMapStatsV3 reports the file bytes, live bytes and
truncations.

Fixes #236.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 02:18:28 -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
pingqiu 9ba9444f37 test: use the storage block address type in deletion control 2026-11-19 01:53:57 -08:00
pingqiu 7869ee9642 test: retain cold birth metadata through zero-chunk deletion 2026-11-19 01:53:45 -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
pingqiu bf50377c46 fix: report segmented counts and cover versioned segment fuzzing 2026-11-19 01:47:07 -08:00
pingqiu a8eab7b361 test: prepare versioned manifests for catalog caller fixtures 2026-11-19 01:45:07 -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
pingqiu ba3db132b0 test: sustain format3 publication beyond WAL capacity and restore exact bytes 2026-11-19 01:37:45 -08:00
pingqiu 28c61803c8 fix: inherit migration checkpoint births without changing unknown coverage 2026-11-19 01:34:22 -08:00
pingqiu 5c835e21af test: preserve legacy segments and version snapshot metadata 2026-11-19 01:32:42 -08:00
pingqiu ac02bbc2ac fix: retain inherited BASE birth frontiers including zero 2026-11-19 01:26:52 -08:00