feat: RIB reconstruction with two-table SQLite output#121
Merged
Conversation
- add rib reconstruction for arbitrary timestamps using base RIBs and replayed updates - support stdout and SQLite output with country and full-feed filters - document rib command behavior in the README and changelog
- remove the rib output-type parameter and use --sqlite-path to enable SQLite output - require --sqlite-path for multi-timestamp rib runs - update README and changelog for the revised rib CLI
- move rib timestamps from repeated --ts flags to positional operands - keep --sqlite-path for SQLite output and multi-timestamp runs - update README, changelog, and examples for the revised rib CLI
BREAKING CHANGE: SQLite output schema changed from single 'elems' table to two tables: - 'ribs': stores final reconstructed RIB states at each target timestamp - 'updates': stores filtered BGP updates for 2nd and later RIBs only Performance improvements: - Use Arc<str> for collector and prefix fields to reduce allocations - Remove unnecessary per-snapshot O(n log n) sorting - Reduce updates query window from +2h lookahead to exact target Changes: - Added StoredRibUpdate struct for tracking filtered updates - Updated RibSqliteStore with two-table schema - Modified reconstruct_snapshots callback to include filtered updates - Added comprehensive documentation for new schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces the
monocle ribcommand for reconstructing RIB (Routing Information Base) state at arbitrary timestamps, with a redesigned two-table SQLite output schema.Commits in this PR
feat: add rib reconstruction command (7b2f888)
--sqlite-pathfix: infer rib sqlite output from sqlite path (018906c)
fix: use positional rib timestamps (b4455ec)
perf: keep rib replay state in memory (1903f88)
feat: redesign RIB SQLite output with ribs and updates tables (bc922d1)
elemstable to two tables:ribs: final reconstructed RIB states at each target timestampupdates: filtered BGP updates for 2nd and later RIBs onlyArc<str>for collector and prefix fields (7% speedup)O(n log n)sortingStoredRibUpdatestruct for tracking filtered updatesBreaking Changes
elemstable, now uses two tables:ribstable: stores final reconstructed RIB statesupdatestable: stores filtered BGP updates used to build 2nd and later RIB snapshotsNew Features
Schema Details
ribs table
updates table (2nd and later RIBs only)
Testing
Documentation