From 6dce14b5bf949e92e588762dedd70c96e7aaac12 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Sat, 5 Dec 2026 03:37:17 -0800 Subject: [PATCH] seaweed-block: a queued rebalance carries the line it was decided against The controller's rebalance ask now names the current line it was decided against (ExpectCurrent), as an endpoint refresh already does. A line published directly since, such as an operator's failover, makes the publisher refuse the queued rebalance (ErrExpectedLineMoved) instead of minting it over that line at the next epoch. Co-Authored-By: Claude Opus 5.5 --- seaweed-block/core/authority/controller.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/seaweed-block/core/authority/controller.go b/seaweed-block/core/authority/controller.go index b24c81008d..75506009ec 100644 --- a/seaweed-block/core/authority/controller.go +++ b/seaweed-block/core/authority/controller.go @@ -510,6 +510,10 @@ func (c *TopologyController) decideVolume( Intent: IntentReassign, Evidence: plannedEvidence(target.PromotionEvidence), Incarnation: target.Incarnation, + // Decided against the line read for this intake: a line + // published directly since (an operator's failover) refuses + // it, so a queued rebalance never overrides that line. + ExpectCurrent: &ExpectedLine{ReplicaID: currentLine.ReplicaID, Epoch: currentLine.Epoch, DataAddr: currentLine.DataAddr, CtrlAddr: currentLine.CtrlAddr}, }, "rebalance", true } return AssignmentAsk{}, "", false