Commit Graph
3475 Commits
Author SHA1 Message Date
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
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
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
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
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