Apply each peer's last update for a prefix in a batch #58

Merged
clawbot merged 1 commits from issue-54-batch-last-update-per-peer into next 2026-10-14 17:09:14 +02:00
1 Commits
Author SHA1 Message Date
clawbot 423fb0fc55 Apply each peer's last update for a prefix in a batch (closes #54)
check / check (push) Waiting to run
The prefix handler's batch kept one update per prefix across all peers,
chosen by timestamp. One routing change reaches many peers within a second,
so most peers' announcements and withdrawals in a batch were dropped, and
for updates in the same second the first one won.

The batch now keeps the last update per prefix and peer, in the order the
feed delivered them, so updates from every peer are applied. A message's
withdrawals are queued before its announcements, so a message that lists a
prefix as both keeps the route (RFC 4271 section 4.3). Tests cover each case
and check the in-memory route count and prefix distribution against the
route table.

Model: opus-5-5
2026-10-14 13:28:44 +00:00