Since #211, the home page cards are worked out once a minute. refreshHomeCards calls Table.Overview, whose walkPrefixes (internal/routetable/overview.go) walks all 1.37 million prefixes under the table's read lock. After each batch of 10,000 it lets the lock go and takes it back at once. The prefix handler, waiting for the write lock, gets it only about once per batch.
What the run of 26d939a shows (#225 (comment) has the figures): the refresh runs at :56.9 of every minute. All five drop bursts of the prefix handler, 4,370 updates by 05:14 UTC, fell between :56 and :06. Elsewhere the feed ran at up to 13,800 messages a second without a drop.
Fix. In walkPrefixes, after each batch, let the lock go for as long as it was held, as PeerDown does since #216. Its doc comment says so in the same sentence PeerDown's uses.
Definition of done.
While Overview walks the table, the prefix handler applies other peers' updates.
A test that fails on the current code shows another peer's 1,000 announcements applied while Overview walks a large table.
The code stays in package routetable (its doc: it answers the route reads the pages need). No new package.
TODO.md gets its entry; README text about the home page refresh matches the code.
Model: opus-5-5
Since https://git.eeqj.de/sneak/routewatch/issues/211, the home page cards are worked out once a minute. `refreshHomeCards` calls `Table.Overview`, whose `walkPrefixes` (`internal/routetable/overview.go`) walks all 1.37 million prefixes under the table's read lock. After each batch of 10,000 it lets the lock go and takes it back at once. The prefix handler, waiting for the write lock, gets it only about once per batch.
**What the run of `26d939a` shows** (https://git.eeqj.de/sneak/routewatch/issues/225#issuecomment-161040 has the figures): the refresh runs at :56.9 of every minute. All five drop bursts of the prefix handler, 4,370 updates by 05:14 UTC, fell between :56 and :06. Elsewhere the feed ran at up to 13,800 messages a second without a drop.
**Fix.** In `walkPrefixes`, after each batch, let the lock go for as long as it was held, as `PeerDown` does since https://git.eeqj.de/sneak/routewatch/issues/216. Its doc comment says so in the same sentence `PeerDown`'s uses.
**Definition of done.**
- While `Overview` walks the table, the prefix handler applies other peers' updates.
- A test that fails on the current code shows another peer's 1,000 announcements applied while `Overview` walks a large table.
- The code stays in package `routetable` (its doc: it answers the route reads the pages need). No new package.
- `TODO.md` gets its entry; README text about the home page refresh matches the code.
Model: opus-5-5
clawbot
self-assigned this 2026-11-02 06:44:22 +01:00
Outcome of the 24-hour run of 9bd0e91 (2026-11-02 07:28 to 2026-11-03 07:28 UTC):
No update was dropped during the home page's walk of the table, the cause this issue fixed.
The prefix handler dropped 108,124 of 427 million messages, in four bursts. Each came while several sessions went down at once; the largest, 91,522 at 04:03 UTC, while ten went down and nineteen opened within ten seconds. That is #225, whose fix is on next but not in 9bd0e91.
The other handlers dropped nothing. Memory peaked at 3.06 GB; the database reached 689 MB.
A run of 742e759, which has that fix, saw the same 04:03 burst and dropped nothing; its outcome goes on #225.
Model: opus-5-5
Outcome of the 24-hour run of `9bd0e91` (2026-11-02 07:28 to 2026-11-03 07:28 UTC):
- No update was dropped during the home page's walk of the table, the cause this issue fixed.
- The prefix handler dropped 108,124 of 427 million messages, in four bursts. Each came while several sessions went down at once; the largest, 91,522 at 04:03 UTC, while ten went down and nineteen opened within ten seconds. That is https://git.eeqj.de/sneak/routewatch/issues/225, whose fix is on `next` but not in `9bd0e91`.
- The other handlers dropped nothing. Memory peaked at 3.06 GB; the database reached 689 MB.
A run of `742e759`, which has that fix, saw the same 04:03 burst and dropped nothing; its outcome goes on https://git.eeqj.de/sneak/routewatch/issues/225.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Since #211, the home page cards are worked out once a minute.
refreshHomeCardscallsTable.Overview, whosewalkPrefixes(internal/routetable/overview.go) walks all 1.37 million prefixes under the table's read lock. After each batch of 10,000 it lets the lock go and takes it back at once. The prefix handler, waiting for the write lock, gets it only about once per batch.What the run of
26d939ashows (#225 (comment) has the figures): the refresh runs at :56.9 of every minute. All five drop bursts of the prefix handler, 4,370 updates by 05:14 UTC, fell between :56 and :06. Elsewhere the feed ran at up to 13,800 messages a second without a drop.Fix. In
walkPrefixes, after each batch, let the lock go for as long as it was held, asPeerDowndoes since #216. Its doc comment says so in the same sentencePeerDown's uses.Definition of done.
Overviewwalks the table, the prefix handler applies other peers' updates.Overviewwalks a large table.routetable(its doc: it answers the route reads the pages need). No new package.TODO.mdgets its entry; README text about the home page refresh matches the code.Model: opus-5-5
Outcome of the 24-hour run of
9bd0e91(2026-11-02 07:28 to 2026-11-03 07:28 UTC):nextbut not in9bd0e91.A run of
742e759, which has that fix, saw the same 04:03 burst and dropped nothing; its outcome goes on #225.Model: opus-5-5