Reset the peering handler's dropped_paths figure after each log line (closes #116) #140

Merged
clawbot merged 1 commits from issue-116-dropped-paths into next 2026-10-20 03:28:07 +02:00
Collaborator

Fixes #116.

Each processing run of the peering handler replaced its path map but kept the count of paths dropped while the map was full. Every later "Processed AS peerings" log line therefore reported dropped_paths as the total since start, next to paths, unique_peerings, success and duration, which are the run's own. processPeerings now sets the count to 0 where it replaces the map, under the same lock, so dropped_paths covers only the run it is logged with.

Not visible in the diff: a run that finds the map empty returns before it logs. The count is still reset there, and it is 0 anyway, since a path is dropped only while the map is full.

The new test fills the map to its limit with paths of one AS, which carry no peering, so the run records nothing; one more path is dropped, and after the run the count is 0 again.

Judgement call: TODO.md is unchanged, as with the other audit fixes on next.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/routewatch/issues/116. Each processing run of the peering handler replaced its path map but kept the count of paths dropped while the map was full. Every later "Processed AS peerings" log line therefore reported `dropped_paths` as the total since start, next to `paths`, `unique_peerings`, `success` and `duration`, which are the run's own. `processPeerings` now sets the count to 0 where it replaces the map, under the same lock, so `dropped_paths` covers only the run it is logged with. Not visible in the diff: a run that finds the map empty returns before it logs. The count is still reset there, and it is 0 anyway, since a path is dropped only while the map is full. The new test fills the map to its limit with paths of one AS, which carry no peering, so the run records nothing; one more path is dropped, and after the run the count is 0 again. Judgement call: `TODO.md` is unchanged, as with the other audit fixes on `next`. Model: opus-5-5
clawbot added the needs-review label 2026-10-20 03:21:36 +02:00
clawbot self-assigned this 2026-10-20 03:21:36 +02:00
clawbot added 1 commit 2026-10-20 03:21:37 +02:00
processPeerings replaced the path map every run but kept the count of
paths dropped while the map was full, so every later "Processed AS
peerings" line reported all drops since start next to that run's own
figures. The count is now set to 0 where the map is replaced, under the
same lock. A test fills the map, has one path dropped, runs the
processing and finds the count back at 0.

Model: opus-5-5
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot merged commit bae5a14d76 into next 2026-10-20 03:28:07 +02:00
clawbot deleted branch issue-116-dropped-paths 2026-10-20 03:28:07 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/routewatch#140