Fix the origin-changes review findings
check / check (push) Failing after 2m14s

Hold the 100,000-row cap after a failed write's rows are put back, dropping and counting the oldest rows past it. Stop counts the unwritten origin changes. The prefix handler's per-write origin change limit is a field, so a test checks that one write leaves the rest. The server and README now say where origin changes come from. README, TODO and schema say 72 hours or 500 rows, whichever keeps more. The prefix page and TODO list the origin change columns and say what the peer count counts. The page takes its 5,000-row note from the constant.

Model: deepseek-v4-pro
This commit is contained in:
2026-11-05 04:33:51 +00:00
parent 347e1456a2
commit 56cfc7e554
12 changed files with 199 additions and 63 deletions
+3 -2
View File
@@ -123,8 +123,9 @@ CREATE TABLE IF NOT EXISTS route_peers (
-- The origin changes of the routing table: each time a prefix and origin AS
-- gained its first peer or lost its last. The prefix handler writes them, and
-- the database maintainer prunes each prefix to its newest 500 rows and 72
-- hours. time is whole seconds since 1970, UTC.
-- the database maintainer prunes each prefix to its newest 500 rows or its
-- rows from the last 72 hours, whichever keeps more. time is whole seconds
-- since 1970, UTC.
CREATE TABLE IF NOT EXISTS origin_changes (
id INTEGER PRIMARY KEY,
prefix TEXT NOT NULL,