diff --git a/seaweed-block/core/host/master/product_loop.go b/seaweed-block/core/host/master/product_loop.go index 1671cc0d78..5d5751e2d9 100644 --- a/seaweed-block/core/host/master/product_loop.go +++ b/seaweed-block/core/host/master/product_loop.go @@ -123,7 +123,10 @@ func (h *Host) RunLifecycleProductTick() (LifecycleProductTickResult, error) { result.SkippedUnverified++ continue } - if h.assignmentAskAlreadyCurrent(ask.VolumeID, ask.ReplicaID, ask.DataAddr, ask.CtrlAddr) { + // A fenced reassign is minted only at its fenced epoch (a second + // application is refused there), so it is never "already current": + // the heal of a failed fencing round names the current replica. + if ask.Evidence.FencedEpoch == 0 && h.assignmentAskAlreadyCurrent(ask.VolumeID, ask.ReplicaID, ask.DataAddr, ask.CtrlAddr) { result.SkippedCurrent++ continue } diff --git a/seaweed-block/core/host/master/workspace_binding.go b/seaweed-block/core/host/master/workspace_binding.go index 5d9bce2d58..103b43bb93 100644 --- a/seaweed-block/core/host/master/workspace_binding.go +++ b/seaweed-block/core/host/master/workspace_binding.go @@ -239,7 +239,10 @@ func (h *Host) admitWorkspacePublication(ask authority.AssignmentAsk, publish fu // A supported snapshot and its direct promotion fallback may both be // dequeued before either commits. Apply the product loop's existing // already-current check again here, rather than advancing the epoch twice. - if ask.Intent == authority.IntentReassign && h.assignmentAskAlreadyCurrent(ask.VolumeID, ask.ReplicaID, ask.DataAddr, ask.CtrlAddr) { + // A fenced reassign needs no such check: the mint takes it only at its + // fenced epoch, so it cannot advance twice (and the heal of a failed + // fencing round names the current replica on purpose). + if ask.Intent == authority.IntentReassign && ask.Evidence.FencedEpoch == 0 && h.assignmentAskAlreadyCurrent(ask.VolumeID, ask.ReplicaID, ask.DataAddr, ask.CtrlAddr) { return nil } // The same mutex covers Register/Delete. It stays held through the actual