Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
feecdb0ca3 |
No files matched your search
@@ -39,8 +39,8 @@ tested.
|
|||||||
handler. The walk over the routing table holds the table's lock for 10,000
|
handler. The walk over the routing table holds the table's lock for 10,000
|
||||||
prefixes at a time, then lets the lock go for as long again, as `PeerDown`
|
prefixes at a time, then lets the lock go for as long again, as `PeerDown`
|
||||||
does. It used to take the lock back at once. The prefix handler then applied
|
does. It used to take the lock back at once. The prefix handler then applied
|
||||||
about one update per 10,000 prefixes walked. During a walk, its queue could
|
about one update per 10,000 prefixes walked. Its queue filled, and the
|
||||||
fill, and the streamer then dropped updates for it (closes #226)
|
streamer dropped updates for it once a minute (closes #226)
|
||||||
- 2026-11-02: like a failed WHOIS lookup, a lookup skipped because its RIR is
|
- 2026-11-02: like a failed WHOIS lookup, a lookup skipped because its RIR is
|
||||||
paused makes the fetcher wait longer before the next lookup. The longest wait
|
paused makes the fetcher wait longer before the next lookup. The longest wait
|
||||||
is one minute. The status page does not count a skip as a failure. A skip used
|
is one minute. The status page does not count a skip as a failure. A skip used
|
||||||
|
|||||||
@@ -114,9 +114,9 @@ func (t *Table) Overview(maxListed int) Overview {
|
|||||||
// holds the read lock for walkBatch prefixes at a time. After each batch, it
|
// holds the read lock for walkBatch prefixes at a time. After each batch, it
|
||||||
// lets the table's lock go for as long as it held the lock for the batch.
|
// lets the table's lock go for as long as it held the lock for the batch.
|
||||||
// During a walk over many batches, updates can then take the lock about half
|
// During a walk over many batches, updates can then take the lock about half
|
||||||
// of the time. The walk may or may not visit a prefix that is added or removed
|
// of the time. A prefix that is added or removed while the lock is let go may
|
||||||
// while the lock is let go. Go allows this in a range over a map that changes.
|
// or may not be visited, as Go allows for a map that changes during a range
|
||||||
// visit must not keep origins once it returns.
|
// over it. visit must not keep origins once it returns.
|
||||||
func (t *Table) walkPrefixes(visit func(prefix netip.Prefix, origins []*origin)) {
|
func (t *Table) walkPrefixes(visit func(prefix netip.Prefix, origins []*origin)) {
|
||||||
t.mu.RLock()
|
t.mu.RLock()
|
||||||
defer t.mu.RUnlock()
|
defer t.mu.RUnlock()
|
||||||
|
|||||||
@@ -133,10 +133,10 @@ func TestWalkPrefixesLetsUpdatesIn(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TestOverviewLetsUpdatesIn applies another peer's 1,000 announcements while
|
// TestOverviewLetsUpdatesIn applies another peer's 1,000 announcements while
|
||||||
// Overview walks a table with more prefixes than five of the walk's batches.
|
// Overview walks a table of more than five batches. After each batch, the walk
|
||||||
// After each batch, the walk lets the lock go for as long as it held the lock.
|
// lets the lock go for as long as it held it, so all of them must be applied
|
||||||
// So all 1,000 announcements must be applied before Overview returns. A walk
|
// before Overview returns. A walk that takes the lock back at once lets in
|
||||||
// that takes the lock back at once lets in about one update per batch.
|
// about one update per batch.
|
||||||
func TestOverviewLetsUpdatesIn(t *testing.T) {
|
func TestOverviewLetsUpdatesIn(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user