Commit Graph
3777 Commits
Author SHA1 Message Date
Ping Qiu dfeab5fa45 Merge pull request #664 from seaweedfs/fix/refresh-live-after-fence
fix(volume): re-draw the live ship session above a completed fence
2026-11-26 23:16:36 -08:00
pingqiuandClaude Opus 5.5 2b55f61579 test(volume): the live re-draw through the real callbacks; R < H control; wider census
The lost-reply tests now run through the executor's registered callbacks:
a proxy forwards every frame to the replica (which admits and acts on it)
and discards its replies, so the fence and the catch-up really fail at
the sender; the failure is forwarded and the healthy verdict that
follows heals the peer, and live traffic is acknowledged. A behind peer
(R < H) is not healed by the healthy verdict, heals only through a
catch-up's registered close (every block equal to the primary's), and
then takes live traffic. The census now covers every reference to the
session order in the adapter's production source (constructor binding
and each draw by case), with helper, alias and outside-a-case controls.
Each control is red against its mutant: no afterFence wiring, no
afterSessionClose wiring, no re-draw on failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 21:45:27 -08:00
pingqiuandClaude Opus 5.5 de6a56b453 fix(volume): re-draw the live session above a session whatever its outcome
The replica takes a session's lineage when it admits it; the sender saw
only the exchange's result. A fence the replica admitted whose reply was
lost, or a recovery session whose close failed, left the replica above
the live session with no re-draw. The fence-complete and session-close
callbacks now re-draw the live session above the session on any outcome
(a completed recovery still advances the cursor and heals). A guard test
over the adapter's draw switch lists every command kind that draws a
session and what re-draws after it; the refresh's log line names the
session and the reason instead of 'after recovery='.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 21:29:44 -08:00
pingqiuandClaude Opus 5.5 7483d9634e fix(volume): re-draw the live ship session above a completed fence
A fence mints its own session from the peer's one session order; once
the replica acknowledges it, the replica holds the fence's lineage, above
the peer's earlier live session, and refuses every later barrier or ship
on that live session as stale. A rejoining replica already at the
primary's end (no recovery session, so no post-recovery refresh) was
never healed. The fence-complete callback now calls the same
RefreshLiveShipSessionAfter the recovery close uses, after the fence's
barrier was acknowledged and before the engine publishes healthy.

The replica's stale-refusal log lines now name their cause (a primary
listener, an epoch below the floor, no role yet, below the held lineage,
or the same lineage with another frontier hint).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 21:14:25 -08:00
pingqiuandClaude Opus 5.5 4bc5803dca test(volume): a fenced caught-up peer is healed on its live session (red)
A replica already at the primary's end is fenced at the peer's epoch with
a session the fence mints, above the live session drawn at the peer's
creation; the replica then holds the fence's lineage, and the engine's
healthy verdict, a barrier on the live session, is refused as stale:
the peer stays degraded. A second test fixes the order: a live session
re-drawn before the fence is acknowledged makes the replica refuse the
fence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 21:14:24 -08:00
Ping Qiu acbd51268c Merge pull request #663 from seaweedfs/ci/process-skip-docs-only
ci: skip the process-level tests for a pull request that changes only docs
2026-11-26 21:02:15 -08:00
Ping Qiu 37aa6a53db Merge pull request #655 from seaweedfs/test/layout-move-lines
test: layout move and lease tests run the product loop and the gate's prebuilt binary
2026-11-26 20:35:30 -08:00
Ping Qiu 1916a8d94c Merge pull request #662 from seaweedfs/docs/host-connect-settings
docs: host connect settings
seaweed-block/v1.0.0-rc.1
2026-11-26 20:23:04 -08:00
Ping Qiu 127bbff374 Merge pull request #651 from seaweedfs/docs/automatic-failover
docs: a lost replicated primary is failed over automatically
2026-11-26 20:18:49 -08:00
Ping Qiu ae41af9917 Merge pull request #661 from seaweedfs/fix/replay-before-attach
fix(storage): a chunk store drains nothing to the extent before its chunk layer attaches
2026-11-26 20:09:33 -08:00
pingqiuandClaude Opus 5.5 6c10de4e30 ci: the docs-only check reads its whole list and never skips on an error
The classification moves into .github/scripts/docs-only-scope.sh: it
writes git's NUL-delimited list to a file and reads it to the end, so no
pipe stops early and a writer's error cannot read as "no other file". A
failed git diff exits nonzero, and the step then runs the tests.

docs-only-scope-test.sh runs first in the step, against real commits:
docs only, docs and a test file, no file, a docs-like prefix, README, a
move out of docs, a docs deletion, 20000 docs files with one other file
last, an unknown revision (an error), and that test.yml applies the check
only to a pull request's process suite and gates all four process steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 19:55:23 -08:00
Ping Qiu 7c14d5bbec Merge pull request #660 from seaweedfs/fix/snapshot-limit-before-cut
fix(snapshot): refuse a snapshot past the limit before its cut
2026-11-26 19:48:41 -08:00
pingqiuandClaude Opus 5.5 bcf2082d5b ci: skip the process-level tests for a pull request that changes only docs
A pull request whose changed files are all under docs/ runs no product
code the process-level tests could exercise, yet waited about 55 minutes
for them. The process job now compares the merge commit with its base
parent; when every changed file is under docs/ it prints "skipped: docs
only (N files under docs/)" and skips the SeaweedFS fetch, the builds and
the named tests, so the required check still reports success. Pushes to
main always run them, as does any pull request with another changed file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 19:48:39 -08:00
pingqiuandClaude Opus 5.5 fe85c6948e test: a delete refused by dependents leaves the volume reserved
Against the real master: a volume-delete refused with
snapshot_has_dependents has already reserved the volume, so workspace
show answers "workspace: volume is being deleted" (exit 1) and HEAD with
its snapshots is unchanged. The control, a delete refused before any
reservation (an established volume under a live lease), leaves show
answering the volume normally. The volume-lifecycle row cites it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 18:57:19 -08:00
pingqiuandClaude Opus 5.5 75e982c9a3 docs: host connect settings, the blockmaster outage as a lower bound
A holder keeps serving for the rest of its lease during an outage, and
the restart barrier is a lower bound, so the outage paragraph states the
known lower bound of the guest's wait and that an outage longer than
ctrl-loss-tmo less the barrier can fail guest I/O, without a threshold
number.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 18:03:58 -08:00
pingqiuandClaude Opus 5.5 003756a63c docs: host connect settings, measured with these options
A run with exactly --ctrl-loss-tmo=180 --reconnect-delay=2 (no
fast_io_fail_tmo): the holder killed and started again 5 s later, a
pending write completed after 6.1 s with no error; the holder kept away,
the write failed with EIO after 181.5 s. The table is no longer marked
derived, not yet run. The failover time stays derived.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 17:56:23 -08:00
Ping Qiu 3767b1dda7 Merge pull request #657 from seaweedfs/fix/rf1-restart-reissue
fix(master): re-issue a runtime RF1 line to the process now holding it
2026-11-26 17:39:00 -08:00
pingqiuandClaude Opus 5.5 5b0f7c8e80 docs: host connect settings, review changes
- The ctrl-loss-tmo derivation shows its sum (re-grant, the start's grant
  wait, the unit restart: about 100 s) and the table is marked derived,
  not yet run.
- reconnect-delay is a retry interval.
- The blockmaster-outage sum: 20 s + the outage + 50 s, so more than about
  110 s outlasts 180 s; the link names the restart text.
- After a failover the options do not redirect the controller: a
  standalone guest reaches only its own host's loopback target, so it must
  run on the new primary's host and connect there (how to tell which host).
- The standalone connect command carries the same options.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 17:26:10 -08:00
pingqiuandClaude Opus 5.5 ed70862944 docs: host connect settings
The operator guide gains "Host connect settings": the nvme connect
options ctrl-loss-tmo, reconnect-delay and fast_io_fail_tmo, values
derived from the longest wait for a target to serve again (the re-grant
barrier, 65 s with default flags), what the guest sees with these values,
with the kernel defaults (up to 10 minutes) and with values too short
(I/O errors reach the filesystem), how a long blockmaster outage relates,
and that the CSI node connects with the kernel defaults, so a pod whose
holder does not return is recovered by recreating it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 17:20:49 -08:00
pingqiuandClaude Opus 5.5 805db02a37 test(storage): census covers package-level references; the paused-cycle test cannot hang
The extent-writer census also inspects declaration initializers and keys
each site by its receiver-qualified owner, with negative controls for a
package-level method-expression alias, a package-level closure and a
same-named method on another receiver. The paused-cycle test bounds its
entry and completion waits, and releases and joins the cycle (bounded)
on any failure before the store's cleanup; under an injected failure
while the cycle is paused it ends at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 17:14:46 -08:00
pingqiuandClaude Opus 5.5 e839a773e1 fix(storage): check the drain hold with the snapshot; backstop at the extent writer
A flusher cycle that started before the owner armed the hold (the flusher
runs from open) could pass the entry check, pause, and then drain the
dirty map Recover filled after the hold. The hold is now checked under
store.mu with the dirty-map snapshot: Recover takes store.mu after the
hold is set, so such a cycle sees it (red locally without this: the
paused cycle advances the checkpoint 1 -> 2 before attach).

writeExtentUnlocked refuses while held and no layer is attached, so a
writer the census misses fails loudly. The census counts every reference
(calls, aliases, method expressions) per site, with negative controls.
Tests: the provider holds on create and open (walstore-chunk only); the
post-attach drain advances the checkpoint and a fetch of the chunk keeps
the now-local block. block-design.md's WAL lifecycle shows the hold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 17:06:49 -08:00
pingqiuandClaude Opus 5.5 f4e7ff4be6 fix(storage): a chunk store drains nothing to the extent before its chunk layer attaches
After a crash, Recover replays a synced write into the dirty map; the
flusher drained it to the extent before the chunk layer attached, so the
block was not marked local and the next fetch of its absent chunk
installed the snapshot's block over the acknowledged write.

The durable provider now holds the drain on a walstore-chunk store before
Recover (HoldExtentDrainUntilChunkLayer); every flusher drain, the stop's
included, does nothing while held; the replayed write stays in the WAL
and is served from the dirty map; attach releases the hold, so the first
drain marks it local. A held store takes no BASE. Writers of the extent
are enumerated by a guard test; INV-CHUNK-LOCAL-BEFORE-FETCH-001.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 16:57:52 -08:00
Ping Qiu 08a67c4b07 Merge pull request #654 from seaweedfs/fix/revoke-ack-retry
fix(blockvolume): ask a revocation ACK again until the lease deadline
2026-11-26 16:44:38 -08:00
pingqiuandClaude Opus 5.5 be7b2c1fd5 docs: delete after a dependents refusal, failover time, profile change order
- A volume-delete refused with snapshot_has_dependents has already
  reserved the volume: it does not serve again; delete or release the
  restored volume, then rerun with the same request id.
- A sync-quorum volume gets its new primary about 30 to 35 s after its
  host is lost with default flags (freshness window, then two probe
  rounds of at most 2 s each).
- The ack profile change order: stop the replicated volumes, change both
  flags, restart blockmaster, start the volumes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 16:44:28 -08:00
pingqiuandClaude Opus 5.5 dc0e45f370 test(storage): a replayed write is not drained before the chunk layer attaches (red)
A synced write into an absent chunk, a crash, a reopen: the flusher
drains the replayed write to the extent before the chunk layer attaches,
so the block is not marked local and the next fetch of its chunk installs
the snapshot's block over it (reads 0x89, want 0xE9). Adds the owner's
hold call (HoldExtentDrainUntilChunkLayer, a no-op here) and the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 16:42:20 -08:00
pingqiuandClaude Opus 5.5 2d374aaee5 fix(snapshot): a scheduled snapshot at the limit still publishes
A volume at the snapshot limit refuses every scheduled snapshot before
its cut, so the schedule would no longer publish the image. The scheduled
pass now runs its ordinary cut after a snapshot_limit refusal and still
records the refusal (status lastFailure snapshot_limit, then
snapshot_overdue).

Tests read the committed image back: after the refusals and the next cut,
and after the scheduled pass at the limit, the distinctive block written
while refused is in the image HEAD names. INV-SNAPK-HEAD-BOUND-001 names
the pre-check, the mapping, the scheduled cut and their tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 16:19:01 -08:00
pingqiu 8837c25b97 Merge remote-tracking branch 'origin/main' into docs/automatic-failover 2026-11-26 16:12:10 -08:00
pingqiuandClaude Opus 5.5 ecdaaaf59b docs: the failover holds, the ack profile rule, delete and move answers
- best-effort volumes and an ack-profile mismatch are held, not failed
  over by themselves (best_effort_no_automatic_failover,
  ack_profile_mismatch); blockmaster refuses an unknown
  --launcher-replication-ack.
- Change the ack profile only with the replicated volumes stopped; a
  primary assigned under another profile does not serve and says so.
- A volume created at run time and not in the cluster spec is served only
  with the lifecycle loop on.
- volume-lifecycle: a delete under a live lease answers not_admitted
  ("deletion refused before persistence"); ordinary snapshots never refuse
  a delete, a snapshot with dependents does (snapshot_has_dependents);
  blockmaster has no same-host refusal for a forced move.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 16:12:09 -08:00
Ping Qiu 97a94b6a8c Merge pull request #652 from seaweedfs/fix/automatic-holds-best-effort
master: the automatic failover path holds a best_effort volume
2026-11-26 16:09:30 -08:00
pingqiuandClaude Opus 5.5 79055a1e74 fix(snapshot): refuse a snapshot past the limit before its cut
A snapshot request on a volume already holding the maximum number of
snapshots ran its cut first and met the limit only at the commit. With new
data, the cut committed unnamed; with none, the cut's session stayed open
on HEAD. Either way HEAD moved, and the answer was 500 internal because
the HTTP mapping had no case for the limit or for a taken name.

SnapshotVolume now checks the count under the volume's snapshot lock,
before it names the cut or opens a session, so the refusal writes
nothing. The holder answers 409 snapshot_limit (new code) and 409
snapshot_exists, neither retryable. The in-commit check stays as the
backstop.

Tests: the snapshot past the limit through the real provider, chunk
control and HTTP route answers 409 snapshot_limit with HEAD unchanged
(generation, activity, root, position), with nothing new and with new data
waiting; the provider test changes from "the cut commits unnamed" to the
same; a volume-delete under a live lease against the real master answers
not_admitted with "deletion refused before persistence".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 16:08:18 -08:00
pingqiuandClaude Opus 5.5 b935d0a73b fix: one read conditions the RF1 refresh; a re-based refresh is a new ask
restartedHolderRefresh decides only when the line it reads is this
replica's at exactly the ask's addresses, and builds ExpectCurrent from
that read, so a move between the tick's address check and this read
yields no refresh rather than one expecting the moved line.

The controller's same-ask dedupe compares the expected line: a refresh
refused because an earlier refresh moved the line is asked again against
the new line instead of being suppressed as a duplicate (red locally
without this: TestControllerReasksARefreshRefusedAfterTheLineMoved times
out waiting for the re-ask).

The host-level stale-refresh test now waits for the publication path's
own refusal of that ask (bounded), instead of a sleep. block-design.md's
authority diagram shows the conditional refresh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 15:41:57 -08:00
pingqiuandClaude Opus 5.5 d0265eae9c test(master): no refresh is decided for the source once a move is in (red)
The tick read the line twice: its address check, then the refresh, which
built its expectation from the second read while writing the ask's
(source) addresses. With a move between the reads the expectation names
the moved line and the publisher accepts it. After a real clean move, the
source's refresh must not be decided at all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 15:38:46 -08:00
pingqiuandClaude Opus 5.5 4414a3a7de fix(authority): a refresh applies only to the line it was decided against
The publisher refuses an endpoint refresh whose ExpectCurrent (replica,
epoch, and the addresses read) is no longer the volume's line, under its
lock, as it does for a conditional reassign. Both refresh producers name
the line they read: the topology controller's refreshAsk and the product
loop's restartedHolderRefresh. invariants.md: the Bound -> Bound refresh
guard and INV-AUTH-RESTART-REISSUE-001's sites and tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 14:51:57 -08:00
pingqiuandClaude Opus 5.5 87850e83d5 test: an endpoint refresh decided before a move is not applied to the moved line (red)
A restarted source holder's refresh, built before the operator's clean
move to another host and applied after it, must not rewrite the moved
line (same replica, next epoch, target addresses) back to the source.
Adds ExpectedLine's addresses and the refresh's decided-against line as
fields, with tests at the publisher (the refresh is refused with
ErrExpectedLineMoved; one decided against the current line applies), the
controller (its refresh names the line it read), and the host (the stale
refresh through the normal publication path after a real clean move).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 14:51:38 -08:00
pingqiuandClaude Opus 5.5 4a2ef23581 test: early-line control runs no tick after the holder starts
The control minted its line before the holder started, then ran one
product tick after the start. When the holder had already reported its
process by that tick, the unbound placement went through the controller,
which re-issued the line for that process, and the control passed. The
control now waits for the early line, checks that it names no process,
and runs no tick after the holder starts (the order the fixture used
before), so the holder refuses the line on every run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 14:31:32 -08:00
pingqiuandClaude Opus 5.5 903c018051 docs(invariants): move the ACK retry row to Part B; Part A names the guard
INV-WS-REVOKE-ACK-RETRY-001 was inserted inside Part A's M4 table; it
now sits in Part B beside INV-WS-REVOKE-ACK-001, and M4 Fenced ->
Drained, Acked states the retry guard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 14:21:33 -08:00
pingqiuandClaude Opus 5.5 c2bbb48d9e test(master): the revocation ACK retry against the real master
A real guard and the real master: the first ACK gets no answer, either
because its answer is lost after the master committed it, or because the
master's first HEAD read outlasts the guard's 5 s bound. The guard asks
again, its drain ends without error (exit 0, not 75), and the master
holds one ACK with the holder's identity, the stopped generation and the
HEAD position. On the parent commit (one attempt) both end with
DeadlineExceeded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 14:21:32 -08:00
pingqiuandClaude Opus 5.5 cc4ea78531 fix(master): re-issue a runtime RF1 line to the process now holding it
When the direct path finds the line current by address but the slot's
reported incarnation is not the line's (a restarted holder, or a move
target whose line names no process), it submits the existing endpoint
refresh (IntentRefreshEndpoint with that incarnation), as the topology
controller does for a static volume (endpointStale, refreshAsk).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:58:45 -08:00
pingqiuandClaude Opus 5.5 f69ca9091b test(master): a runtime RF1 line is re-issued to a restarted holder or a move target (red)
A CreateVolume RF1 workspace volume is served only by the product loop's
direct path, which treats a line at the same addresses as current. A
holder restarted there (a new incarnation), or a move's target started
after the move minted a line naming no process, refuses that line and is
never re-issued one. The tests expect the next tick to re-issue the line
for the reporting process (EV+1 naming it), and nothing for the same
report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:58:45 -08:00
pingqiuandClaude Opus 5.5 903626f0e9 Layout move and lease tests mint the first line after the holder reports
A primary line is issued for the process at its endpoints and blockvolume
refuses a line that names no process. For a workspace-bound RF1 volume the
product loop's direct path never re-issues a line whose addresses already
match, so a line minted from a hand-ingested observation before the holder
started was never replaced, loop or not. Both tests now start the holder,
wait until blockmaster observes its slot with its process incarnation, and
only then run the product tick that binds, as production orders it.

SWBLOCK_TEST_EARLY_LINE=1 is the control: the line is minted from a
hand-ingested observation before the holder starts, with no product loop,
as before. Native: lease PASS, control FAIL at "unleased host did not adopt
assignment"; move control FAIL at "source did not serve" with the
empty-process refusal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:56:29 -08:00
pingqiuandClaude Opus 5.5 3c46082801 fix(volume): name the ack profile refusal ahead of the backend's reason
The refusal is read once and named first, since it is also why the
durable backend refuses. invariants.md M1 Recovering -> Serving and the
Kubernetes failover diagram carry the primary's profile check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:54:56 -08:00
pingqiuandClaude Opus 5.5 f0651b7f85 test(volume): the profile refusal is named on the production status path (red)
With the durable backend wired as the status source (as blockvolume
does), status reports the backend's generic stale-primary reason, not the
profile mismatch naming both profiles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:54:53 -08:00
pingqiuandClaude Opus 5.5 c2ee18cdcc Lease binary test: the same product loop and prebuilt binary
TestBinaryWorkspaceLeaseOptInOwnsCLEANShutdown minted its line from a
hand-ingested observation before the holder started, like the layout move
test, so the holder refused the line that named no process. Both tests now
share runProductLoop (the lifecycle product loop every 100 ms, as
blockmaster runs it) and blockvolumeUnderTest (the gate's prebuilt binary
when SWBLOCK_TEST_BINS is set). The control is now
SWBLOCK_TEST_NO_PRODUCT_LOOP=1, for both tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:34:31 -08:00
pingqiuandClaude Opus 5.5 8fb26969d3 Layout move test: run the product loop; use the gate's prebuilt binary
A line is issued for the process at its endpoints, and a holder refuses a
line that names another process. The test minted the initial line from a
hand-ingested observation before the source started, so it named no
process and the source refused it ("issued for process <empty>"; source did
not serve). The test now runs the lifecycle product loop as blockmaster
does, which re-issues a line once the process reports itself (the initial
line, and a move's target). LAYOUT_MOVE_NO_PRODUCT_LOOP=1 leaves the loop
off and reproduces the refusal (the control). With SWBLOCK_TEST_BINS set
(a gate run) the test uses that prebuilt blockvolume instead of building a
race-enabled one, so the binary it runs is the one the gate hashed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:28:03 -08:00
pingqiuandClaude Opus 5.5 389de85ee2 docs(invariants): the revocation ACK retry contract
INV-WS-REVOKE-ACK-RETRY-001: asked again only after no answer
(DeadlineExceeded, Unavailable), within the lease deadline and the 19 s
closeout; the master answers a repeat of a recorded ACK as recorded while
the line is revoking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:26:52 -08:00
pingqiuandClaude Opus 5.5 118f6c8fd8 fix: a primary serves only under the master's ack profile; check the fencing round
Every assignment names blockmaster's ack profile; a primary of a
replicated line whose own --replication-ack is another one is not Healthy
(its status names both), so a lost primary that cannot answer
acknowledged under the master's profile. fencedDecision also holds on
the fencing round's own ProfileMismatch, the evidence it counts.
invariants.md: the M3 promotion-candidate row, the MATCH row's fencing
round, and the new INV-PRIMARY-ACK-PROFILE-001; the Kubernetes design
no longer says best_effort is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:03:46 -08:00
pingqiuandClaude Opus 5.5 af2b7e4d22 test: a lost primary's and the fencing round's ack profile (red)
The survivors' answers cannot show the profile the lost primary
acknowledged under. Adds AssignmentFact.ack_profile (blockmaster's
profile) with tests: an assignment names the master's profile; a primary
of a replicated line in another profile (or under a master that names
none) does not serve and says why, while its own profile or an RF1 line
serves; and a fencing round answered in another profile publishes
nothing, on both gates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:03:28 -08:00
pingqiuandClaude Opus 5.5 8b0da9cd67 docs(invariants): best_effort and ack profile mismatch hold the automatic path
INV-PROMOTE-FRONTIER-BEST-EFFORT-001 now states the hold (it said the
gate promoted the highest-durable candidate) and names the renamed
product-loop test; INV-PROMOTE-ACK-PROFILE-MATCH-001 is new.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 12:52:55 -08:00
pingqiuandClaude Opus 5.5 affc3a34f6 fix(master): hold the automatic path on an ack profile mismatch
The volume answers each promotion probe with its own --replication-ack;
the probe round names every answer whose profile is missing or differs
from blockmaster's (or an unknown master profile), and both gates hold
such a volume before any fencing round (ack_profile_mismatch), as they
hold a best_effort one. One helper (automaticFailoverHold) decides both,
called before the unsupported gate reads its candidates, so a held volume
always shows why. blockmaster refuses an unknown --launcher-replication-ack.
The best_effort product-loop test now expects the hold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 12:51:25 -08:00
pingqiuandClaude Opus 5.5 d35deb9fb5 fix(blockvolume): ask a revocation ACK again until the lease deadline
An ACK call that got no answer (DeadlineExceeded, Unavailable) is made
again until the lease deadline; the master answers a repeat of a recorded
ACK as recorded, so a busy master no longer turns a clean stop into exit
75. The closeout wait becomes 19 s: the units' TimeoutStopSec=30s less
the 5 s drain, the 5 s exit wait and 1 s margin. blockmaster logs each
AckWorkspaceRevoked step's time (lock, HEAD read, recorded, answered).

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