diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-09 16:27:38 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-09 16:27:38 +0000 |
| commit | 895359aeb6746b98ff82944e4fca503f4a6e5439 (patch) | |
| tree | ea01bf45433282a365748dd3ba102879946d2426 /docs/tutorials | |
| parent | 83d29a446d96f87e5c947faf49fb33f18db4fc17 (diff) | |
feat(sync): add cleanup loops and metrics for rejected events index
Add automatic cleanup and Prometheus metrics for the two-tier rejected
events index that caches rejected announcements for re-processing.
Cleanup loops:
- Hot cache: Every 60 seconds (events expire after 2 minutes)
- Cold index: Every 24 hours (metadata expires after 7 days)
- Background task with graceful shutdown support
New Prometheus metrics (7):
- Gauges: hot_cache_current, cold_index_current
- Counters: hits, misses, hot_expired, cold_expired, invalidated
This completes the maintainer announcement re-processing feature,
reducing wait time from 24 hours to <1 second when a maintainer's
announcement arrives before the repository owner's announcement.
Memory is bounded through automatic cleanup, and comprehensive metrics
enable monitoring of hit rates, memory usage, and cleanup effectiveness.
Changes:
- src/sync/metrics.rs: Added 7 metrics with recording methods
- src/sync/rejected_index.rs: Added optional metrics support
- src/sync/mod.rs: Added cleanup background task
Tests: 248 library tests passing, 3 integration tests passing
Diffstat (limited to 'docs/tutorials')
0 files changed, 0 insertions, 0 deletions