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>
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>
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>