File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -93,8 +93,7 @@ fn main() {
9393 let parser = BgpkitParser :: new ( local_path. to_str ( ) . unwrap ( ) ) . expect ( "failed to create parser" ) ;
9494 let mut raw_iter = parser. into_raw_record_iter ( ) ;
9595
96- // Track whether we've consumed the first record (PeerIndexTable) so metrics include it.
97- let mut consumed_first_record = false ;
96+ // Consume first record (PeerIndexTable) for Elementor; metrics will include it.
9897
9998 // Elementor requires the peer index table for TableDumpV2
10099 let mut elementor = Elementor :: new ( ) ;
@@ -105,7 +104,6 @@ fn main() {
105104 elementor
106105 . set_peer_table ( record)
107106 . expect ( "first record is not a PeerIndexTable; this example expects a RIB file" ) ;
108- consumed_first_record = true ;
109107 } else {
110108 eprintln ! ( "empty input: no records found" ) ;
111109 return ;
@@ -123,9 +121,7 @@ fn main() {
123121 let records_parsed = Arc :: new ( AtomicU64 :: new ( 0 ) ) ;
124122
125123 // Include the initial PeerIndexTable record in the records count for consistency with parse-only runs.
126- if consumed_first_record {
127- records_parsed. fetch_add ( 1 , Ordering :: Relaxed ) ;
128- }
124+ records_parsed. fetch_add ( 1 , Ordering :: Relaxed ) ;
129125
130126 // Channels: batches of RawMrtRecord
131127 let ( batch_tx, batch_rx) = channel:: bounded :: < Vec < RawMrtRecord > > ( chan_cap) ;
You can’t perform that action at this time.
0 commit comments