Remove a peer's live routes when its session goes down (closes #56)
check / check (push) Waiting to run
check / check (push) Waiting to run
RIS sends no withdrawals for the routes of a peer whose BGP session goes down, so those routes stayed in the live tables for good. The streamer now hands STATE messages to the handlers that want them and never drops one for backpressure: it waits for room in a full queue until the idle timer drops the connection. When the prefix handler gets one whose state is down, it drops the peer's updates still in its batch and notes the peer; the next flush deletes all of the peer's live routes, IPv4 and IPv6, before writing the batch, so updates the peer sends after the down are kept. The live route tables' unique key now leads with peer_ip, so it also finds a peer's routes. Model: opus-5-5
This commit is contained in:
@@ -57,6 +57,7 @@ type Store interface {
|
||||
UpsertLiveRouteBatch(routes []*LiveRoute) error
|
||||
DeleteLiveRoute(prefix, peerIP string) error
|
||||
DeleteLiveRouteBatch(deletions []LiveRouteDeletion) error
|
||||
DeleteLiveRoutesOfPeer(peerIP string) (deleted int, err error)
|
||||
GetPrefixDistribution() (ipv4 []PrefixDistribution, ipv6 []PrefixDistribution, err error)
|
||||
GetPrefixDistributionContext(ctx context.Context) (ipv4 []PrefixDistribution, ipv6 []PrefixDistribution, err error)
|
||||
GetLiveRouteCounts() (ipv4Count, ipv6Count int, err error)
|
||||
|
||||
Reference in New Issue
Block a user