Prove on a real bus a lost verified sender is issued again once the judgement passes (issue 930)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user