mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
master: a fenced reassign is never skipped as already current
The heal of a failed fencing round reassigns the current replica at its own endpoints, which the product tick and the publication admission both dropped as already current. A reassign with a fenced epoch skips that check: the mint takes it only at that epoch, so it cannot advance twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cfa2891502
commit
3d0ca51699
2 files changed
+8
-2
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user