Commit Graph
1830 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 199bb65fc6 Publish the issued lease atomically and accept any older-epoch HEAD
A move issue published the new epoch's lease view and then, in a
separate lease-lock section, replaced the deadline with issue + TTL. A
renewal of the new epoch landing between the two raised the deadline,
and the issue then lowered it under the outstanding grant, so later
renewals inside that grant were refused. The view and the initial
deadline are now published in one section, and the issue never lowers a
deadline.

A forced move now accepts any HEAD at an epoch below the expected one,
read after admission, with the lost range from that HEAD's RemoteLSN.
Requiring the HEAD generation and LSN recorded at the issue refused the
volume for good when an earlier holder's in-flight claim landed after
the next move was issued and that move's holder then died unclaimed. A
HEAD at the expected or a higher epoch that is not the expected holder's
is still refused; clean moves are unchanged.

Comments now say what admission guarantees: the expired holder starts
no new claim or cut, but a claim already sent may still land. The
paused-holder test witnesses the refused attach decision instead of
watching HEAD for a fixed time, and the design document and invariants
record the issue-to-lease transition, the forced HEAD rule and the open
model check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 04:47:11 -08:00
pingqiuandClaude Opus 5.5 fe0cd8448c Start the new holder's lease when a workspace move is issued
A move issue cleared the lease and the new holder's lease was created
only by its first renewal. A holder that died between its grant and its
first renewal left the volume with no lease, so no move was ever
admitted again, not even a forced one. A holder that died after renewing
but before claiming HEAD was stuck too: HEAD still named its predecessor
and the forced move refused it.

The issue write now starts the new holder's lease (horizon issue +
1.5*TTL, granted deadline issue + TTL, the same values a first grant
uses), so an unclaimed grant expires like any other lease and a forced
move is admitted after that lease's expiry plus the skew bound, never on
a predecessor's lease. The holder's first renewal is an ordinary renewal
of that lease, with no extra write.

A forced move also accepts a HEAD that still names the predecessor when
it is unchanged since the move to the expected holder was issued (same
generation and remote LSN, older epoch). Clean moves are unchanged.
Blockmaster reads HEAD for a forced move only after its lease admission
holds, so the HEAD the move and its lost range rest on can no longer be
changed by the expired holder. A holder resuming after the forced move
is refused at attach by its lease-gated projection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 04:10:03 -08:00
Ping Qiu 50fb815470 Merge pull request #284 from seaweedfs/fix/cut-abort-reason
fix(storage): tolerate short saver bursts and report local aborts
2026-11-20 02:15:19 -08:00
Ping Qiu e6c74a55bc Merge pull request #285 from seaweedfs/feat/blockvolume-single-filer
blockvolume: refuse to start unless the chunk filer is the only filer
2026-11-20 01:37:09 -08:00
pingqiu dd759ed074 test(storage): join both burst writers after cleanup timeout 2026-11-20 01:12:03 -08:00
pingqiuandClaude Opus 5.5 3d850aa236 chunkstore: compare filer addresses with their zone; recheck the deadline
isTarget compares resolved addresses with netip (IPv6 zone included);
an address that does not parse never matches. A round whose bound ran
out while a later master was still being asked does not pass on an
earlier favourable answer. The ledger row maps to the M4 table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 01:10:15 -08:00
pingqiuandClaude Opus 5.5 961f08f66e chunkstore: the single filer must be the configured one, on every master
A pass now needs a master listing exactly the configured filer (same
gRPC port, same or co-resolving host). Every master is asked: any
master listing another filer or several refuses at once, whichever
answers first. Each master call is bounded within the remaining time,
so a stalled master no longer consumes the whole bound. Startup census
only; invariant INV-WS-SINGLE-FILER-001 and its M6 row record it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 00:53:13 -08:00
pingqiu cfd2a8332c fix(volume): retain terminal close precedence for aborted cuts 2026-11-20 00:49:09 -08:00
pingqiu 2f6cf84c04 test(storage): witness unread candidates after hot-first ordering 2026-11-20 00:39:11 -08:00
pingqiu 782505510a fix(storage): allow bounded saver admission for write bursts 2026-11-20 00:36:47 -08:00
pingqiu 94aface439 fix(volume): report local cut abort before cancelled upload 2026-11-20 00:33:50 -08:00
pingqiuandClaude Opus 5.5 7578b34095 chunkstore: wait for the filer to register before refusing
A fresh filer registers with its master some seconds after it serves
(14 s in the swap smoke), so "no filer listed" is asked again every
second until a 60 s bound and refused only then. Several filers are
still refused at once; an unreachable master is retried the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 00:28:23 -08:00
pingqiuandClaude Opus 5.5 a5785ff688 blockvolume: refuse to start unless the chunk filer is the only filer
Block metadata needs exactly one filer behind --chunk-filer. At startup
the chunk wiring asks that filer for its masters and filer group
(filer_pb.SeaweedFiler/GetFilerConfiguration), then the masters for the
filers of that group (master_pb.Seaweed/ListClusterNodes). It refuses
unless a master lists exactly one, and when it cannot get that answer
within 15 s. The filer subset gains GetFilerConfiguration and a master
subset carries ListClusterNodes, generated with the committed plugin
versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 00:20:10 -08:00
Ping Qiu b42815eb3b Merge pull request #282 from seaweedfs/feat/blockvolume-pprof-fsync-hist
blockvolume: opt-in CPU profile toggled by SIGUSR1
2026-11-20 00:18:03 -08:00
pingqiuandClaude Opus 5.5 26e34b6b9a test: expect the profile dir refused where SIGUSR1 is missing
On platforms without SIGUSR1 a set --cpu-profile-dir is refused in flag
parsing; the default (off) stays common to all platforms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 23:57:18 -08:00
pingqiuandClaude Opus 5.5 fb939adb8a blockvolume: validate the profile dir before startup; stop joins the worker
parseFlags refuses an unusable --cpu-profile-dir (and a platform without
SIGUSR1) before run() activates anything; the handler is installed at
the top of run(). stop removes the handler, stops and joins the signal
worker, then writes out a running profile, so a buffered SIGUSR1 cannot
start a profile after it. Tests decompress the whole profile and check
that no profile runs after stop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 23:47:25 -08:00
pingqiuandClaude Opus 5.5 39f011555a blockvolume: opt-in CPU profile toggled by SIGUSR1
--cpu-profile-dir (default $SWBLOCK_CPU_PROFILE_DIR) names an existing
directory; SIGUSR1 then starts a CPU profile written there as
blockvolume-<pid>-<n>.pprof and the next SIGUSR1 stops it. Shutdown
writes out a running profile. Unset (the default), nothing is installed
and blockvolume is unchanged. No port is opened, so a harness can
profile any running volume with kill -USR1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 23:36:05 -08:00
Ping Qiu 26c13b50a4 Merge pull request #279 from seaweedfs/test/cut-upload-deadline-class
test: require upload retries to reach the caller deadline
2026-11-19 21:36:37 -08:00
pingqiu b16782dcf9 test: require upload retries to reach the caller deadline 2026-11-19 21:13:15 -08:00
Ping Qiu 74823e651a Merge pull request #271 from seaweedfs/fix/bounded-cut-payloads
storage: bound cut payload memory
2026-11-19 21:10:59 -08:00
pingqiu 1903666200 fix: clean settled roots after provider cancellation 2026-11-19 20:30:37 -08:00
pingqiu 4c7dd6e749 docs: record cut retry deadline and causal controls 2026-11-19 20:26:18 -08:00
pingqiu b27e18265e test: check large candidate intent counts and attached batch scratch 2026-11-19 20:22:33 -08:00
pingqiu 69072a0c27 fix: let bounded upload workers advance independently 2026-11-19 20:21:14 -08:00
pingqiu 8be2e13128 test: witness local reads progress past a stalled upload 2026-11-19 20:20:40 -08:00
pingqiu 260921eef3 fix: validate saved WAL blocks into the owned chunk buffer 2026-11-19 20:17:47 -08:00
pingqiu f87f513bdf test: cover cut abort status and named snapshot failure 2026-11-19 20:16:35 -08:00
pingqiu d3ad5aa87c test: assert retry deadline and intent coverage 2026-11-19 20:16:35 -08:00
pingqiu c9d13e1b6e fix: bound cut intent traffic and batch read scratch 2026-11-19 20:16:35 -08:00
pingqiu 9edf300fd7 test: expose cut intent amplification and batch read scratch growth 2026-11-19 20:16:35 -08:00
pingqiu 77fc4e5c12 fix(volume): expose the COW read counters in cut responses 2026-11-19 20:16:35 -08:00
pingqiu ed5d4369e7 docs(storage): define budget admission and revocation lifetime 2026-11-19 20:16:35 -08:00
pingqiu 1d2f68f75a test(storage): keep budget tickets until revoked capture workers join 2026-11-19 20:16:35 -08:00
pingqiu 80740d5d80 feat(storage): call the host budget seam at cut and COW admission 2026-11-19 20:16:35 -08:00
pingqiu 6ad15dd16f test(storage): require budget admission and COW reservation hooks 2026-11-19 20:16:35 -08:00
pingqiu 6caa8699cb docs(storage): describe the configurable cut payload bound 2026-11-19 20:16:35 -08:00
pingqiu 34bee24be2 fix(storage): enforce the configured per-volume cut payload budget 2026-11-19 20:16:35 -08:00
pingqiu 46505243db test(storage): bound cut slots by configured payload budget 2026-11-19 20:16:35 -08:00
pingqiu ce7d290d4a test(storage): verify hottest-first copy and upload order 2026-11-19 20:16:35 -08:00
pingqiu fc06e7f6c4 test(storage): distinguish upload retry from abandoned cut points 2026-11-19 20:16:35 -08:00
pingqiu df5d3a6d7d storage: keep zero-data guest writes progressing without aborting updates 2026-11-19 20:16:35 -08:00
pingqiu bc73b9920a storage: let local reads re-resolve across flushing without pinning WAL 2026-11-19 20:16:35 -08:00
pingqiu a4ec0e2396 storage: require unpinned WAL progress and frozen-slot PUT retries 2026-11-19 20:16:35 -08:00
pingqiu 24405a8a28 storage: settle reusable intent roots once per wave after a definite outcome 2026-11-19 20:16:35 -08:00
pingqiu 7cc044549f storage: retain the concurrent HEAD oracle across locally refused cut points 2026-11-19 20:16:35 -08:00
pingqiu 67a18b151b storage: account for local COW WAL reads and measure a full WAL-resident chunk 2026-11-19 20:16:35 -08:00
pingqiu 2717e4ec69 storage: bind chunk capture and flush contracts to the local borrow lifetime 2026-11-19 20:16:35 -08:00
pingqiu 8cb3295c94 storage: defer claimed chunks during flush and cap reclaim below skipped entries 2026-11-19 20:16:35 -08:00
pingqiu 69a1689ee4 storage: require the flusher to defer claimed chunks without a global pause 2026-11-19 20:16:34 -08:00
pingqiu 0c02f20eac storage: document adaptive staging contracts and exercise steady hot writes 2026-11-19 20:16:34 -08:00