Commit Graph
3526 Commits
Author SHA1 Message Date
pingqiuandClaude Opus 5.5 7642b2c8e0 authority: the workspace writer and ask dedupe keep the line's process
The workspace record writer copies the line's incarnation, so a lease or
journal write no longer erases it before a reload; a queued refresh for
one process is replaced when another reports at the same address; the
RefreshEndpoint transition names the restart case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 20:21:02 -08:00
pingqiuandClaude Opus 5.5 7863d9e1f1 authority: asks built outside the controller record the target's process
A heal, a planned or workspace move or an operator's request names no
incarnation; the publisher records the one the target reports now, so
the promoted process's first report re-issues nothing. The volume's
refusal of a line issued for another process now comes before anything
of it is recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 20:14:30 -08:00
pingqiuandClaude Opus 5.5 18f39b9646 authority: a restarted primary is re-issued its line at a new endpoint version
A primary restarted at the same epoch and address started its sessions
at 1 while each replica held the dead process's higher one, so every
session was refused as older. The line now records the process it was
issued for (durable); a current primary reporting another process is
re-issued its line at the next endpoint version, and a primary adopts no
line issued for another process.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 20:07:02 -08:00
Ping Qiu e9c4c57b43 Merge pull request #632 from seaweedfs/fix/one-session-order
replication: one session order per replica
2026-11-25 19:25:53 -08:00
Ping Qiu 503f48cd93 Merge pull request #633 from seaweedfs/feat/readd-retained-base-status
feat: a replica refused a rebuild for a retained base reports rebuild_retained_base (v1 limit)
2026-11-25 19:24:36 -08:00
Ping Qiu 0ca3a47352 Merge pull request #630 from seaweedfs/test/skip-ahead-lsn-refused
transport: a replica applies a live entry only at its next LSN
2026-11-25 19:22:53 -08:00
Ping Qiu f96eb41e57 Merge pull request #613 from seaweedfs/ci/model-action-trace
Require model action citations for mapped files
2026-11-25 19:05:11 -08:00
pingqiuandClaude Opus 5.5 eef225587f test: two fixtures ship at the store's next LSN
The lane-routing harness gets a store, and the ingress version test
starts from a replica that holds 1..119, so their live entries arrive at
the next LSN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 19:03:29 -08:00
pingqiuandClaude Opus 5.5 f46a8f8d75 fix(volume): a replica latched on a retained base is never ready for promotion
Its image could not be brought up to date, and the latch clears only on a
completed rebuild: a probe or fencing round answer from it is never
ready, so no promotion (automatic, the operator's failover or a planned
move, each requiring the target's ready answer) can make it primary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 18:59:12 -08:00
pingqiuandClaude Opus 5.5 eb9ad5cb41 docs(volume): the self-fence object is the replica listener
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 18:56:23 -08:00
pingqiuandClaude Opus 5.5 d6d1664b3a feat: a replica refused a rebuild for a retained base reports rebuild_retained_base
A replica removed and added back with its older store cannot be rebuilt
on v1 (its BASE is still installed). The store now returns the typed
storage.ErrRebuildRetainedBase, the replica listener keeps that refusal
until a rebuild completes, and the volume host reports it on its
heartbeat slot as rebuild_retained_base (ineligible), naming the replica.
The operator guide gives the recovery: wipe the data directory, re-add.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 18:50:45 -08:00
pingqiuandClaude Opus 5.5 3b1305258f test: a re-added replica with a retained base reports a typed reason (red)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 18:50:45 -08:00
pingqiuandClaude Opus 5.5 263602e933 replication: one session order per replica
Live-ship and recovery session ids came from two process-wide counters;
once the live counter ran ahead, the replica refused every recovery as
older. Each replica now has one order, kept by the volume across its
peers and executors, and every session toward it takes the next id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 18:49:42 -08:00
pingqiuandClaude Opus 5.5 c2fe9dc639 test: the mid-recovery write test opens the recovery as a dual-lane session
The recovery begins with BeginEpochRecovery, so the primary's live
session stays admissible and only the invalid epoch table can refuse its
frames; a recovery begun and ended is the control. The test is its own
package so its sessions do not reorder another test's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 18:37:49 -08:00
Ping Qiu 32eaf872c9 Merge pull request #623 from seaweedfs/test/keep-full-daemon-logs
test: a failed real-process test keeps its daemons' whole logs
2026-11-25 18:26:40 -08:00
pingqiu 585aafaafb ci: map volume creation and replication peer actions 2026-11-25 18:20:45 -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
pingqiuandClaude Opus 5.5 eea052d975 test: a replica mid-recovery is never counted
While a recovery owns a replica's store its epoch table is invalid and its
end may sit above a gap. Such a replica is never a fencing round's target,
also with the highest end, and never completes a sync_all or sync_quorum
write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 18:16:22 -08:00
pingqiuandClaude Opus 5.5 9dc28cff21 test: the kept daemon log is the whole log
The copy into $SWBLOCK_TEST_LOG_DIR moves to an untagged helper, so a
filesystem-only test runs with the ordinary suite: a log longer than the
kept output is copied byte for byte, an unset directory copies nothing,
and the check refuses a truncated copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 18:12:01 -08:00
pingqiuandClaude Opus 5.5 662a1d007f transport: the next-LSN rule also holds with the apply gate
The volume's listener always has the apply gate installed, and the gate
checks each block's staleness, not the position, so the live-lane rule
applies on both paths. The tests build the listener as the volume does,
on walstore and smartwal, and check that no live entry lands while a
recovery owns the store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 18:10:08 -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 d072078640 transport: a replica applies a live entry only at its next LSN
Inside an epoch, a live entry above the store's next LSN is refused and
the connection closed; the primary's catch-up from the barrier end then
applies the gap in order. Fixtures that shipped hand-picked LSNs now ship
at the store's next LSN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:56:10 -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 39d2ca40db transport: a live frame whose LSN skips ahead inside an epoch must be refused (red)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:29:06 -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