From 24a433038464de3dd2bd436ff628882c91b30e10 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Wed, 25 Nov 2026 14:29:06 -0800 Subject: [PATCH] master: check the newer round is open after the late delivery is refused Co-Authored-By: Claude Opus 5.5 --- .../core/host/master/probe_round_late_answer_test.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/seaweed-block/core/host/master/probe_round_late_answer_test.go b/seaweed-block/core/host/master/probe_round_late_answer_test.go index ba963776b4..6542b53fb0 100644 --- a/seaweed-block/core/host/master/probe_round_late_answer_test.go +++ b/seaweed-block/core/host/master/probe_round_late_answer_test.go @@ -32,13 +32,16 @@ func TestProbeRound_AnOldRoundsLateAnswerIsRefusedByTheNewRound(t *testing.T) { return nil } // round B: only round A's answer arrives now; B's own never does. - // Round B must be open (registered) at that moment and distinct - // from A, so the refusal is the new round's, not a closed hub's. + // Round B must be open at the refusal and distinct from A, so the + // refusal is the new round's, not a closed hub's. Checked AFTER the + // delivery: a round is never reopened, so B still registered then + // proves it was open when A's answer was refused. + d := delivery{roundA: held.RoundId, roundB: r.RoundId} + d.accepted = hub.deliver(held) hub.mu.Lock() _, open := hub.rounds[r.RoundId] hub.mu.Unlock() - d := delivery{roundA: held.RoundId, roundB: r.RoundId, newerOpen: open && r.RoundId != held.RoundId} - d.accepted = hub.deliver(held) + d.newerOpen = open && r.RoundId != held.RoundId delivered <- d return nil })