From fdf0ad08c2f454ab6d6f4d8cb308fba8968c38d5 Mon Sep 17 00:00:00 2001 From: pingqiu Date: Wed, 25 Nov 2026 06:10:51 -0800 Subject: [PATCH] master: an empty fenced answer counts only on a read, valid table Co-Authored-By: Claude Opus 5.5 --- seaweed-block/core/host/master/fence_gate_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/seaweed-block/core/host/master/fence_gate_test.go b/seaweed-block/core/host/master/fence_gate_test.go index 045cb9550b..7765e5b63c 100644 --- a/seaweed-block/core/host/master/fence_gate_test.go +++ b/seaweed-block/core/host/master/fence_gate_test.go @@ -149,6 +149,9 @@ func TestPromotionGate_EmptyVolumePrimaryLost(t *testing.T) { }{ "both fenced at end 0": {fencedAs(PromotionCandidateEvidence{ReplicaID: "r2", Ready: true, Floor: 2, TableValid: true}, PromotionCandidateEvidence{ReplicaID: "r3", Ready: true, Floor: 2, TableValid: true}), 2}, "one fenced": {fencedAs(PromotionCandidateEvidence{ReplicaID: "r2", Ready: true, Floor: 2, TableValid: true}), 0}, + // Empty means evidence read on a present, valid table at end 0: an + // answer whose read failed (no table reported) proves nothing. + "both at end 0, one read failed": {fencedAs(PromotionCandidateEvidence{ReplicaID: "r2", Ready: true, Floor: 2, TableValid: true}, PromotionCandidateEvidence{ReplicaID: "r3", Ready: true, Floor: 2}), 0}, } { t.Run(name, func(t *testing.T) { h := newTestMasterWithControllerConfig(t, t.TempDir(), authority.TopologyControllerConfig{ExpectedSlotsPerVolume: 3})