Prove on a real bus a lost verified sender is issued again once the judgement passes (issue 930)

This commit is contained in:
2026-10-16 17:43:25 +02:00
parent b2e2bf0638
commit 1c3c3edc7d
2 changed files with 57 additions and 2 deletions
@@ -196,8 +196,13 @@ func giveVerifiedSendersBack(ctx context.Context, d *doctor) {
all := judgeRootFree(ctx, r, records.Nodes, time.Now())
records.RootFree, _ = rootVerdictsOf(all)
where := broker.PlacementsOf(records, records.Interchangeable)
bus := link.OverNATS{Conn: d.js.Conn(), JS: d.js.Context()}
reissueVerifiedSenders(records, where,
reissueVerifiedSendersOn(ctx, link.OverNATS{Conn: d.js.Conn(), JS: d.js.Context()}, records, where)
}
// reissueVerifiedSendersOn is reissueVerifiedSenders on the bus: memberships read from the AssignmentsStream and
// published to it.
func reissueVerifiedSendersOn(ctx context.Context, bus link.OverNATS, records broker.Records, where broker.Placements) int {
return reissueVerifiedSenders(records, where,
func(node, module string) ([]byte, error) {
m, err := bus.JS.GetLastMsg(broker.AssignmentsStream, broker.MembershipSubject(node, module))
if err != nil {