Commit Graph
3501 Commits
Author SHA1 Message Date
pingqiu d94770bca4 fix: let cold pre-copy stops use measured rounds 2026-11-25 18:19:52 -08:00
pingqiu b930dda1a2 test: expose cold pre-copy estimator starvation 2026-11-25 18:19:52 -08:00
Ping Qiu 37de5cda8c Merge pull request #616 from seaweedfs/f4/master-head-one-reader
blockmaster: one HEAD reader, the layout catalog
2026-11-25 18:17:25 -08:00
Ping Qiu aba6a9f040 Merge pull request #625 from seaweedfs/feat/manual-failover-fenced
fix(master): manual failover of a lost primary decides on the fencing round (RF2 and RF3)
2026-11-25 18:03:43 -08:00
pingqiuandClaude Opus 5.5 b948bdac77 chunkstore: an entry time past 2262 is unknown, not a wrapped value
Review: the catalog reader converted the entry's seconds to nanoseconds
without a range check, so an out-of-range mtime (year 9999) wrapped to a
negative time where the HTTP reader had reported it unknown (0). The
conversion is guarded; the master reader's refusal table has the
out-of-range case again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:55:42 -08:00
pingqiuandClaude Opus 5.5 d08cee2315 blockmaster: refuse the removed --workspace-head-base-url at start
v1 reads HEAD through the layout catalog. A unit or script that still
passes the removed flag is refused at start with a typed error
(errRemovedInV1) that names the replacement, --chunk-filer and
--chunk-path, rather than Go's generic unknown-flag message; the flag
is never accepted and ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:53:01 -08:00
Ping Qiu cf4b1ba9fa Merge pull request #626 from seaweedfs/fix/primary-reports-store-wait
master, volume: a primary reports that it awaits replica stores; the gate keeps no state
2026-11-25 17:52:04 -08:00
Ping Qiu f9c7fbf1fd Merge pull request #627 from seaweedfs/test/volume-identity-creation-guards
test: guard VOLUME creation and cryptographic layout ids
2026-11-25 17:48:20 -08:00
pingqiuandClaude Opus 5.5 d759eeefa1 test(master): the unsupported-path heal is dispatched and published, and asks nothing once the line reaches the fenced epoch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:45:43 -08:00
pingqiuandClaude Opus 5.5 76e5b02d3b test(master): the unsupported-path recovery test runs past the pending grace and asserts the volume is unsupported
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:45:06 -08:00
pingqiuandClaude Opus 5.5 0f2182b189 test(master): the failover race barrier fails on timeout; recovery proven end to end through a store fault and a normal tick
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:43:19 -08:00
pingqiu b2a5856e60 docs: state the literal-entry-name guard limitation 2026-11-25 17:38:18 -08:00
pingqiuandClaude Opus 5.5 b8324424c5 volume: the probe answer reads the wait before readiness; no latch
The 'starting' latch could outlive a frontend that opened and failed
between two samples, excusing a real failure. It is gone: the probe answer
reads the replica-store wait before its readiness (the frontend gate reads
the same value), so a not-ready answer names the wait only if the wait
held, and a stores-complete assignment opens the frontend only after the
peers' expected stores are installed. The gate is a guard in the ledger
(INV-PROMOTE-CREATION-WAIT-001); the probe round's copy of the field is
tested on the wire.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:38:12 -08:00
pingqiu 5be5e528c2 test: count repository-wide VOLUME creator and constant sites 2026-11-25 17:35:30 -08:00
pingqiuandClaude Opus 5.5 d4416a1e96 docs: the operator's fenced failover in M3 (Part A) and the promotion diagram
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:34:46 -08:00
pingqiu 8b50a9bdba test: enumerate the VOLUME writer and crypto identity source 2026-11-25 17:30:33 -08:00
pingqiuandClaude Opus 5.5 77e150d22e blockmaster: one HEAD reader, the layout catalog
The master read HEAD two ways with two settings: the layout catalog
(filer gRPC, --chunk-filer) for create and restore, and plain filer HTTP
?metadata=true (--workspace-head-base-url) for the workspace move admission
and the revoke ACK. The workspace reader now reads through the catalog it
already dials: BCatalog.ReadHeadObserved returns HEAD, decoded by the same
DecodeLayoutHeadEntry, with the entry's modification time from that same
lookup (seconds, as the HTTP metadata gave it). The proof mapping is
unchanged: identity from the master's lifecycle record, deleting, unclaimed,
detached, generation, epoch, holder and position; an absent HEAD refuses
with ErrHeadAbsent.

The HTTP reader and --workspace-head-base-url are deleted, with the unit's
and the env file's setting and the docs. The master tests run the same
refusal table against a catalog on the in-memory filer (the HTTP-only
redirect and envelope cases have no counterpart). The fixtures that passed
the flag give the master the filer flags instead; the head-size and F1
ladder masters had none and could not dial the catalog at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:29:50 -08:00
pingqiuandClaude Opus 5.5 17004151bf fix(master): a fenced failover's fence is pending from the attempt; the unsupported gate heals it
The operator's fencing round may fence survivors above the line whatever
it decides, and an allowed decision may still fail to publish: the fence
is now pending from the attempt until a line reaches its epoch. The
unsupported gate continues the line's own primary at e+1 on a pending
fence before any candidate check, as the supported gate does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:28:56 -08:00
pingqiuandClaude Opus 5.5 7903ffaeb1 test(master): a fenced failover's recovery: unpublished allowed round, unsupported-path heal (red)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:28:26 -08:00
pingqiuandClaude Opus 5.5 b514b76605 volume: the awaiting report lasts until the frontend opens; one value under a lock
The stores-complete assignment set the awaited count to zero before the
frontend opened, so a probe in between answered not ready without the
awaiting epoch: the shape the master reassigned. The line now stays
"starting" from its wait until its frontend has opened on it (seen by a
probe answer or a heartbeat); a later not-ready answer is a real one. The
epoch, the counts and that start are one value under one lock, so a probe
never pairs a new epoch with an old count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:26:38 -08:00
pingqiuandClaude Opus 5.5 4555092854 fix(master): fence only the failover of an unreachable primary; test the race with the promotion loop
A reachable RF3 sync_quorum primary's move is a planned move again and
stays refused for want of a seal; only the operator's failover of an
unreachable primary is decided on the fencing round. Adds the test where
the operator's failover and the master's promotion loop decide the same
volume at once: both fence at the same next epoch, one line is published.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:22:09 -08:00
pingqiuandClaude Opus 5.5 1b0cd2047f master, volume: a primary reports that it awaits replica stores; the gate keeps no state
The promotion gate excused a new volume's not-ready primary from the
master's own reading of the creation wait, which a master restart forgets
and which ends a moment before the primary opens its frontend. The fact's
owner now reports it: the probe answer carries the epoch of the primary's
assignment that still awaits replica stores, and the gate excuses a
not-ready primary only on that answer for the current line and while its
own fresh slot is acceptable. The master-side wait check is deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:21:16 -08:00
pingqiuandClaude Opus 5.5 2a146a90cd docs: the manual failover's fencing round in INV-PROMOTE-UNKNOWN-CURRENT-001 and the alpha README
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:17:14 -08:00
Ping Qiu 042b05980f Merge pull request #622 from seaweedfs/feat/cleaning-default-on
blockvolume, durable: the holder's cleaning is on by default and runs after each snapshot delete
2026-11-25 17:16:16 -08:00
pingqiuandClaude Opus 5.5 43ccf9456e fix(master): manual failover of an unreachable primary runs the fencing round at every replica count
An operator failover whose primary has no fresh, reachable heartbeat (a
lost host) is no planned move from a live primary: it is now decided on
the fencing round for RF2 as for RF3 (one path, basis Fenced). A failover
from a reachable RF2 primary stays planned; best_effort stays refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:12:18 -08:00
pingqiuandClaude Opus 5.5 6db8fbd8cf test(master): RF2 manual failover of an unreachable primary decides on the fencing round (red)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:12:07 -08:00
pingqiuandClaude Opus 5.5 8058cad9e5 fix(master): RF3 sync_quorum manual failover runs the fencing round
A planned move of an RF3 sync_quorum volume needs a seal (its target is
not in every acknowledgement set), so the operator's failover was refused
and a volume whose primary host is lost could not be moved at all. The
fencing round is that seal: the failover now fences every other replica at
the line's next epoch and publishes only on the round's decision (enough
fenced survivors; the target holds the highest fenced end and is ready),
with basis Fenced. A refused round leaves the fence pending so a returning
primary is continued at e+1. RF2 and sync_all stay planned moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:05:26 -08:00
Ping Qiu a945e2c416 Merge pull request #617 from seaweedfs/test/opdelete-during-clean
chunkstore: tests for an operator snapshot delete during a cleaning and a stock filer's conditional writes (sequential and concurrent)
2026-11-25 17:04:52 -08:00
pingqiuandClaude Opus 5.5 9fccb40247 test(master): RF3 sync_quorum manual failover decides on the fencing round (red)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:04:18 -08:00
Ping Qiu 55d258b83f Merge pull request #621 from seaweedfs/test/layout-id-start-refusal
fix: refuse launcher layout identity mismatches with exit 78
2026-11-25 17:01:38 -08:00
Ping Qiu 76f8afa36c Merge pull request #612 from seaweedfs/test/head-generation-source-guard
test: guard HEAD generation comparisons
2026-11-25 16:57:44 -08:00
pingqiuandClaude Opus 5.5 63bff3a5c0 chunkstore: the cleaning test's comments use the public model name
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:55:42 -08:00
Ping Qiu b58b04e6db Merge pull request #619 from seaweedfs/test/name-reuse-late-head
chunkstore: a late HEAD create of an abandoned restore lands after the name is reused
2026-11-25 16:44:21 -08:00
Ping Qiu 2759b5658a Merge pull request #611 from seaweedfs/fix/creating-primary-not-replaced
master: a primary in the creation wait is not replaced for answering not ready
2026-11-25 16:43:19 -08:00
pingqiuandClaude Opus 5.5 1e40249ec7 durable: a kick stays pending across busy passes; the kick is in M8's model and ledger
Review: a second busy refusal lost the kick and fell back to the hourly
interval, so a snapshot session longer than the 30 s retry defeated it.
The kick now stays pending until a pass the volume does not refuse as
busy; every busy retry comes after the short delay. KickMaintenance
reports only a running loop (not a stopped one, nor one that ended on a
fence or lineage change).

Tests: busy -> busy -> success, then back on the interval; kicks during a
held pass coalesce into exactly one follow-up; the running-loop check;
the cut-cancels-cleaning regression bounds every wait and cancels and
joins its cleaning on failure.

Protocol contract (M8 timing change): MaintenanceOwner.tla gains the
kick, the session that makes a pass busy, and NoLostKick, with a negative
config (lost_kick: a busy pass drops the kick) that violates it; the four
existing configs keep their results. The design diagram gains the kick
and busy-retry edges; the ledger gains INV-MAINT-KICK-001 and
INV-MAINT-KICK-RETRY-001; the spec README records the run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:28:31 -08:00
pingqiuandClaude Opus 5.5 62f742e588 blockvolume: the maintenance interval's help names the pass it times
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:18:33 -08:00
pingqiuandClaude Opus 5.5 e74acb6b91 blockvolume, durable: the holder's cleaning is on by default and runs after each snapshot delete
Owner decision: automatic cleaning is on in v1. The holder's maintenance
pass already cleans through its own layout remote (holder-only, one
entry, refused while a snapshot session is open, the two-step conditional
removal, a cut or stop cancels it with bounded waits); it was behind
--chunk-maintenance-gc, off by default.

- --chunk-maintenance-gc defaults to true; =false is the one switch that
  turns the cleaning off. The pass still runs every
  --chunk-maintenance-interval (default 1h; 0 disables the whole pass).
- A snapshot deleted through the holder's control route kicks the
  volume's maintenance loop for one pass now (kicks coalesce; the same
  bounded pass). A kicked pass refused as busy (a cut session open) is
  tried again after 30 s instead of an interval later. Retention's deletes
  already precede the cleaning in the same pass; a delete made offline is
  cleaned by the next periodic pass.
- Docs: operator guide, standalone deployment, and the spec README line
  that called automatic GC opt-in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:11:00 -08:00
pingqiuandClaude Opus 5.5 d018a9d396 chunkstore: race DELETE against REUSE with both released at the same instant
The lagged rounds only showed one write after the other (a 5 ms lag
against a ~1 ms conditional write), never a delete whose check and
removal overlap a reuse in flight. 128 rounds now release both kinds at
the same instant, with the same assertions whichever wins; the 8 lagged
rounds stay, for outcome coverage. The writers' 16 connections are kept
across rounds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:04:05 -08:00
pingqiuandClaude Opus 5.5 f66d796baa chunkstore: a stock filer lets either the delete or one reuse of a marked entry through
Cleaning is on by default, so the remover's DELETE and a successor's
REUSE of the same marked entry race in production. On a real weed, 16
writers per round (half DELETE with the entry's mark, half REUSE on the
metadata they read) are released together: exactly one succeeds at the
filer. A delete leaves no entry and every reuse refused; a reuse leaves
the entry unmarked under its session and every delete and other reuse
refused. Never both.

The fixture's readbacks fail the test on a read error (an unreadable
entry is never taken as absent), and each subtest bounds its setup and
readbacks with its own deadline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 15:57:25 -08:00
pingqiu b12bac31f1 docs: cite full paths for layout identity startup checks 2026-11-25 15:55:52 -08:00
pingqiu 1cdbc25955 test: enumerate recovery identity refusal sites 2026-11-25 15:53:13 -08:00
pingqiu ba3b6c3868 fix: refuse mismatched launcher layout identities without retry 2026-11-25 15:51:59 -08:00
pingqiu 54ac4a1e11 test: count synthetic engine-view comparison sites [skip ci] 2026-11-25 15:48:15 -08:00
pingqiu 325e3b882f test: scan storage generation sites and document aggregate limit [skip ci] 2026-11-25 15:48:15 -08:00
pingqiu 88b0a44e26 test: guard HEAD generation identity comparisons 2026-11-25 15:48:15 -08:00
pingqiu c07ea70965 test: enumerate raw HEAD generation comparisons outside CAS 2026-11-25 15:48:15 -08:00
pingqiuandClaude Opus 5.5 6cd951696b chunkstore: a late HEAD create of an abandoned restore lands after the name is reused
A restore dies between its VOLUME and its HEAD; the operator releases it,
the snapshot is deleted and the name is taken by a new volume. The
abandoned restore's late HEAD create must be refused (the deleted HEAD in
its never-reused directory) and the new volume untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 15:48:11 -08:00
pingqiuandClaude Opus 5.5 aecce190ac chunkstore: concurrent conditional writes on a stock filer have one winner
The cutover removed the store's concurrent CAS test with the legacy
store. This one runs on the layout store against a real weed: 16
writers, each on its own connection, are held at the filer write until
all have arrived (after every client-side pre-read) and released
together, 4 rounds each, for HEAD updates at one generation, exclusive
HEAD creates, MARKs of one object entry, and conditional deletes of it.
Exactly one writer succeeds at the filer, the others are refused, and
the entry holds the winner's bytes; a delete with a mark the entry never
carried never succeeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 15:48:02 -08:00
pingqiuandClaude Opus 5.5 a49d00b3a3 chunkstore: a stock filer refuses HEAD's wrong-condition writes
The store adapter needs no model only if the filer's conditional write
holds. On a real weed filer: a second exclusive create, a stale and a
future generation, and the right generation under another volume's
identity are each refused by the filer and leave HEAD's generation and
bytes unchanged; the same write with the true condition lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 15:48:02 -08:00
pingqiuandClaude Opus 5.5 4a74437258 chunkstore: test an operator snapshot delete during an open cleaning
The cleaning has taken its HEAD view when the operator deletes a
snapshot: one HEAD update by nobody's lease that leaves the clean
activity open. The pass keeps every chunk its view named, never marks a
chunk a root still names (K6 checked at every mark), and ends; the next
pass removes the chunk only the deleted snapshot named.

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