-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
record_to_elems() may fail silently #182
Comments
Thank you for bringing this issue up! My current thinking about processing records without peering_index_table first:
The issue about silently failing is valid, and it might be better to panic or somehow bubble up an error instead of only logging errors. What do you think? Also, it would be helpful if you could provide some more concrete example/scenario so that I can better understand your use case and reason about a solution on this matter. |
The idea was to skip processing mrt records based on the timestamp in the CommonHeader. Since I am working with local mrt files, I cannot use an API to limit the time range. In the process of implementing that, I made some mistakes with the use of Now I have learned that I cannot skip any record that has subtype of So my thoughts were to add a sentence or two in the documentation of |
Thanks for the explanation! The PEER_INDEX_TABLE should always be the first record for any RIB dump file. For RIB dumps, I agree that you should be able to skip the entire RIB dump file based on the first CommonHeader as you mentioned. You don't need to go through any records further in the dump file. I am also curious about your experience on iterating BGP records and using |
Indeed, I tried using |
When running
record_to_elems()
onbgpkit_parser::parser::mrt::mrt_elem::Elementor
, the function may fail silently due to the following:bgpkit-parser/src/parser/mrt/mrt_elem.rs
Line 364 in fb15bb4
Moreover, it is noteworthy that this error can be triggered when running
record_to_elems()
only selectively and skipping records, aspeer_table
may not be initialized that way. This may also happen in case anElementor
is incorrectly created for every record.Thanks for this project
The text was updated successfully, but these errors were encountered: