Not at the last store attestation: a primary restarted after the last
attestation, before it adopts the complete assignment, was no longer
creating by the record and could be replaced. The record now sets
awaiting_first_ready in the same write that clears its initial set, and
clears it, durably and for good, at the line's primary's first ready
answer; until then the volume is creating. A record written before the
field existed carries none, so an established volume is never reopened.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A creating volume is no longer replaced when its primary is not ready for
another reason, answers a stale epoch, or has an unacceptable slot: no
promotion decision is even probed (the owner's ruling and its model).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A volume whose first line has not reached Healthy is never subject to a
replacement decision: no reassign, no fencing round, no heal at a higher
epoch. One predicate, checked first in both gates and in the operator's
move: the master's record still awaits a replica store, or the current
primary's own answer says its assignment at this line's epoch awaits
them. The creation-wait excuse that judged such a primary ready (and so
let the supported gate fence its replicas at e+1 and heal the primary at
e+1 before epoch 1 was ever healthy) collapses into it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>