Commit Graph
3468 Commits
Author SHA1 Message Date
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
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 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 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
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
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 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
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
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
Ping Qiu 6ed99b411b Merge pull request #574 from seaweedfs/cutover/b
change: cut over to the content-named store and delete the legacy store
2026-11-25 15:47:31 -08:00
Ping Qiu dc74f59132 Merge pull request #618 from seaweedfs/docs/inv-promote-frontier-path
docs: INV-PROMOTE-FRONTIER-001 cites where SyncAckKnown is set now
2026-11-25 15:34:55 -08:00
Ping Qiu 2bd2afae54 Merge pull request #614 from seaweedfs/fix/stream-resend-no-info-var
master: the assignment stream keeps no local copy of the assignment
2026-11-25 15:07:57 -08:00
Ping Qiu 337f82f584 Merge pull request #615 from seaweedfs/test/probe-round-late-old-answer
master: an old probe round's late answer is refused by a new round (test)
2026-11-25 14:59:54 -08:00
pingqiuandClaude Opus 5.5 ab747bfa47 change: cut over to the content-named store and delete the legacy store
The runtime stores each volume in one content-named layout on the filer:
immutable chunks, segments and roots are ordinary filer files, and one
HEAD entry per volume carries every conditional commit. A holder claims
HEAD under its granted epoch and claim id, cuts in its own session,
commits by HEAD generation and position, and is fenced when its identity
moves. Catalog, restore, snapshot, retention, cleaning, verify and volume
delete run through the layout kernel; the master mints the layout
identity, reads HEAD proofs and holds the delete reservation and lease
barrier. The legacy store, its intents and its compatibility paths are
removed; existing stores are recreated, not converted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:59:23 -08:00
pingqiuandClaude Opus 5.5 71682c1e03 master: a primary in the creation wait is not replaced for answering not ready
A new volume's primary hides its frontend until the master has recorded
every replica's store, so it answers the promotion probe "not
primary-ready" by design. Past its boot grace, the promotion gate took
that for a failed primary and fenced it, reassigning the volume. While the
master still awaits the volume's stores (read before the probe), and only
while the primary's own fresh slot is acceptable, the not-ready answer is
judged as the wait; an unreachable, ineligible or withdrawn primary is
still replaced. Fixtures that fail over an established volume now attest
its stores.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:56:17 -08:00
pingqiuandClaude Opus 5.5 a135bef99c docs: INV-PROMOTE-FRONTIER-001 cites where SyncAckKnown is set now
85171f71 removed core/host/master/promotion_probe.go; the probe round
(core/host/master/probe_round.go) sets SyncAckKnown since. The row's
"Enforced in" cell still named the removed file, so
TestActiveInvariantRowsCiteExistingPaths failed (the -short CI run skips
internal/invcheck).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:36:45 -08:00
pingqiuandClaude Opus 5.5 24a4330384 master: check the newer round is open after the late delivery is refused
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:29:06 -08:00
pingqiuandClaude Opus 5.5 dcbcb0c7b0 master: the late-answer test proves a newer round is open at the delivery
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:25:16 -08:00
pingqiuandClaude Opus 5.5 44bdfa6ca7 master: test that an old probe round's late answer is refused by a new round
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:21:45 -08:00
pingqiuandClaude Opus 5.5 0c6b3ff608 master: the assignment stream keeps no local copy of the assignment
The re-send on a store record change held the last line in a local
adapter.AssignmentInfo variable, which the non-forgeability guard refuses
(only the publisher mints one). The stream now keeps a closure that
rebuilds the fact from the line it received.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 14:14:06 -08:00
Ping Qiu f24312e39f Merge pull request #609 from seaweedfs/fix/store-learn-bringup
replication: a failed store-learning barrier never degrades the peer
2026-11-25 12:44:03 -08:00
pingqiuandClaude Opus 5.5 6354c7087d replication: the store-learning controls fail, never skip, when the replica cannot re-bind
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 12:36:40 -08:00
Ping Qiu 47ea126e89 Merge pull request #608 from seaweedfs/r5/double-failover
test: a double failover of an RF3 sync-quorum volume reads back every acknowledged write
2026-11-25 12:08:55 -08:00
Ping Qiu 3c4bf79d3b Merge pull request #596 from seaweedfs/fix/fence-rejoin
volume, replication: a fallen-out replica rejoins without an operator (role-call retry; degraded re-probe on by default without racing the live session)
2026-11-25 12:08:20 -08:00
pingqiuandClaude Opus 5.5 cd0d17bcd8 replication: the redial control waits for the dropped connection
The control slept a fixed time and could pass with no connection accepted
and dropped. It now waits for the listener's accept-then-drop and fails if
none happened; without the transport fix it fails at the store assertion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 12:04:48 -08:00
pingqiuandClaude Opus 5.5 353df5993e transport: a barrier that fails on its connection drops it
A send or receive failure left session.conn in place, so a caller that
does not invalidate the session (the store learner) reused the dead
socket on every retry and never learned a restarted replica's store. The
barrier now detaches and closes the connection, as the catch-up and
rebuild senders do; the next barrier re-dials.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 11:55:27 -08:00
pingqiuandClaude Opus 5.5 c7cff76f00 replication: the store learner runs on the peer's queue worker
The learning barrier used the peer's connection from its own goroutine,
outside the work queue that keeps one writer per connection, so on an
exposed volume it could overlap the first ship. It is now a queue job on
that worker; it is queued only when there is room (it never saturates the
queue, which would degrade the peer) and retried otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 11:47:43 -08:00
pingqiuandClaude Opus 5.5 9bcb6c28cd replication: a failed store-learning barrier never degrades the peer
At bring-up the primary may install a peer whose replica does not listen
yet. The barrier that learns the replica's store then failed and degraded
the peer; nothing re-probes a degraded peer before a write, so its store
was never attested and a new volume never left creating. The store-learning
barrier now leaves the peer as it is on failure and retries in the
background (100 ms doubling to 2 s) until the store is learned or the peer
leaves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 11:43:24 -08:00
pingqiuandClaude Opus 5.5 5a6048a218 volume: a late older fact never clears a newer pending supporting assignment
A supporting fact cleared pendingSupport unconditionally, so a late replay
of an older line (its role call refused as stale) wiped the assignment a
newer fact left pending; the retry then admitted the newer listener but
never completed its assignment. A fact now clears or replaces the pending
assignment only when its epoch is the same or newer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 11:24:46 -08:00
pingqiuandClaude Opus 5.5 5244dc3663 volume: both supporting completions run through one guarded function
The fact's own successful role call released selfFenceMu before it
completed the supporting assignment, and facts run concurrently by design,
so a newer self-primary or excluding fact could cross: the old admission
then cleared that fact's primary watchdog or emitted an old marker. The
direct path and the retry now both complete through
completeSupportingIfCurrentLocked, which checks and completes without
releasing selfFenceMu: only while the desired role is still replica at that
epoch and no newer fact was seen. A newer fact records its epoch under the
lock before it acts, so it waits for the completion or supersedes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 11:07:22 -08:00
pingqiuandClaude Opus 5.5 a292f142cc volume: an old supporting completion never lands after a newer transition
The retry released selfFenceMu before completing a skipped supporting
assignment, and only supporting completions took the lock that ordered it,
so a newer self-primary or excluding fact could act in between; the retry
then ran supportingAdmitted for the old epoch (clearing the primary
watchdog) and emitted an old ready marker. The retry now completes under
selfFenceMu, and every fact records its epoch under that lock at the very
start of applyFact, before it acts at all (the watchdog runs before the
role call); the retry completes only while no newer epoch was seen. A newer
fact waits at that record until the completion is done. Only the record is
under the lock, so facts applied concurrently by design do not nest it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:51:04 -08:00
pingqiuandClaude Opus 5.5 49dcf2d22e volume: note why the role-call retry does not touch shipPrepared
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:33:33 -08:00
pingqiuandClaude Opus 5.5 a0b6a5da17 volume: order the supporting completion with a narrow lock, not around applyFact
A mutex around all of applyFact deadlocked facts applied concurrently by
design (a replay worker beside the stream, a fact applied from inside
another's hook). supportMu now spans only the completion of a supporting
assignment, in the fact path after its role call released selfFenceMu and
in the retry (supportMu, then selfFenceMu), so an older epoch's completion
never lands after a newer one's. The retry completes the pending
assignment only while the host still wants the replica role at its epoch;
a newer fact moves that epoch or replaces the pending entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:33:11 -08:00
pingqiuandClaude Opus 5.5 e69c2af879 volume: a role-call retry completes the supporting assignment the failure skipped
When a supporting fact's replica role call failed, the fact returned before
the adapter took the line's identity and before the supporting admission
was recorded. The retry cleared the latch but never applied those, so with
no new fact the engine stayed at the old line. The skipped assignment is
now kept (pendingSupport) and the retry completes it once its role call
succeeds at that epoch, with the same steps as the assignment path. A new
mutex serialises applyFact with that completion (order: it, then
selfFenceMu), and every applied fact supersedes a pending one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:33:11 -08:00
pingqiuandClaude Opus 5.5 663c745d89 volume: pin the window between the prime check and the adapter's first command
After PrimePendingFor's identity check the registry lock is released
before OnAssignment, so the peer can be replaced in between. That window
is closed by the executor: every command the adapter issues runs through
the old peer's BlockExecutor and enters through beginAsyncOperation, and
UpdateReplicaSet stops a replaced peer's executor (stopped under its lock,
then in-flight work drained) before it installs the replacement and seeds
it. The lock graph on PrimePending now says so, and a test holds the
dispatch in that window (a package-private hook), replaces the peer at the
same lineage on another address of the same replica, and checks that no
late connection reaches the replica and the replacement keeps its session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:33:10 -08:00
pingqiuandClaude Opus 5.5 314b79bff1 volume: a probe dispatch acts only for the peer it was admitted for
Priming and the adapter lookup were keyed by ReplicaID. A dispatch the loop
admitted for an old degraded peer, delayed while a lineage bump replaced the
peer under the same ReplicaID, then primed the new healthy peer's adapter,
whose probe raced the volume's live session again. The registry now keeps
the exact peer each adapter was added for; PrimePendingFor and
AdapterForPeer compare it under the registry lock, and a mismatch primes
nothing and sends no wire probe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:33:10 -08:00
pingqiuandClaude Opus 5.5 88a03a40bb component: the apply-failure recovery test follows deferred priming
The test waited for its registry adapter to probe the new peer right after
the add, which is the adapter acting on a healthy peer the volume's live
session owns. It now checks the adapter has issued nothing at the add and
wires the probe loop as the binary does (priming on the first dispatch for
a degraded peer); its degrade, recover and replay assertions are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:33:10 -08:00
pingqiuandClaude Opus 5.5 70ef278671 volume: the per-peer adapter never opens sessions on a healthy peer; degraded-peer re-probe on by default
With the degraded-peer probe loop on, the per-peer adapter registry primed
each new peer's engine at the add, and the engine's assignment probe and
fence ran on the replica with sessions of their own while the volume's
seed barrier and live ship owned it. The replica keeps the newest session,
so it refused the volume's own barrier as stale and the next write missed
quorum. The registry now records the identity at the add and primes the
adapter only on the probe loop's first dispatch for the peer, which comes
only once the peer is degraded (its live session failed and was
invalidated); that first dispatch is the adapter's own probe, not a second
one. With the race gone, --degraded-probe-interval defaults to 5s, so a
replica that fell out of the volume rejoins without an operator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:33:10 -08:00
pingqiuandClaude Opus 5.5 0a069427a5 volume: a failed replica role call is retried until it succeeds
A replica whose floor could not be persisted (a full or read-only disk)
latched its role failure and stayed out of the volume until an operator
restarted it. The host now re-applies the current replica role with
backoff and clears the latch on success; a refusal that a retry cannot
change (ErrRoleRefused: the ingress is closed, or the volume refuses
replica peers) keeps its reason and is not retried.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:33:10 -08:00
pingqiuandClaude Opus 5.5 df88f674a7 test: a double failover of an RF3 sync-quorum volume reads back every acknowledged write
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:28:09 -08:00
Ping Qiu 395a2b0953 Merge pull request #597 from seaweedfs/fix/failover-ship-order-main
volume, replication: a promoted replica moves its ship order to its store before it serves
2026-11-25 09:34:37 -08:00
pingqiuandClaude Opus 5.5 ab3023c655 volume: track the prepared ship order apart from the listener role
The move of the ship order to the store keyed on the listener role, which
a primary fence sets before the move runs. A refused move followed by a
replay of the same line skipped it, and so did a genuine primary after the
excluded-replica path had fenced the listener as primary only to close
ingress. The host now records 'ship order prepared' itself: cleared when
it takes a replica role, set only after a successful move.

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