Files
seaweedfs/seaweed-block/core/host
10b949183c seaweed-block: a promotion gate's replace decision logs what the controller did with it (#13428)
* fix(master): a promotion gate's replace decision logs what the controller did with it

A replace decided by the promotion gate went to the topology controller,
which can drop it on six paths without a word. These are: a stale basis,
superseded slot facts, a boot-grace hold, no evidence on the target, an
ask that is already desired, and an unsupported topology. When a volume
then did not fail over, nothing on the master's log said why.

The controller now records, per volume, what its last intake did: the ask
it enqueued, or why it enqueued none (LastOutcome). After each tick's
submit, the master logs every replace decision with that outcome, or with
why the decisions were not submitted. Every publication is logged too.

The creation-gap process test derives its failover bound from its own
flags: one loop to the tick that ends creation, plus the freshness window
to the loss, plus one loop to the tick that reads it. It waits twice that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: a replace decision is reported with its own submission's outcome, and on a binding-read failure

Review round 1:
- The tick reads the controller's outcome for each volume inside the
  intake that carried it (SubmitObservedStateOutcomes, under the
  controller's lock): the background observation host shares the
  controller and may submit before a later read.
- A workspace binding read that fails after the probe reports the tick's
  replace decisions as not submitted, with the error, before returning.
- The production-tick test waits for the publication line (bounded): the
  publisher logs it from its observer after the line is visible.
- A replace decision is identified by a flag set where it is decided, not
  by its display text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: ledger row for the replace-decision report

Review round 2: Part C rule 4. INV-PROMOTE-DECISION-REPORTED-001 names the
regression tests this change adds (an intake after the submission, the
binding-read failure after the probe) and their enforcing functions.
Diagnostics only: no state machine or model change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: split the replace-decision ledger row under the statement limit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* seaweed-block: gateNoteMu also guards gateReplaces

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
2026-12-05 14:37:46 -08:00
..