-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix: Continue iteration after recoverable errors in SdrIter #23
Conversation
Thank you very much for your contribution :) Have some minor changes, but overall this is a great change (and much more in the spirit of what I had envisioned it to do :P) |
One more nit, and please be so kind to add a note in the CHANGELOG.md. For the rest it looks great & about ready to merge! |
Signed-off-by: Robin Lu <[email protected]>
Done |
Thank you for your contribution :) Merged! |
Released as |
Hi dear @datdenkikniet
This PR improve the SdrIter implementation where the iterator would stop iterating upon encountering a recoverable error.
Key changes in this PR:
1 Fix recoverable error handling:
When a recoverable error (IpmiError::ParsingFailed) is encountered, the iterator now skips the current record and continues iterating over subsequent records.
The next_id is updated with the next valid record ID, ensuring the iteration proceeds.
2 Add a limit to recoverable errors:
To prevent potential infinite loops in extreme cases where consecutive recoverable errors occur, a MAX_RECOVERABLE_ERRORS constant is introduced. If the iterator encounters too many recoverable errors, it will log an error and terminate safely.