fix: handle broadcast RecvError::Lagged gracefully in maintenance loop#448
Closed
thepastaclaw wants to merge 1 commit intodashpay:feat/reactive-peer-recoveryfrom
Closed
Conversation
- Replace tracing::error! with log macros for consistency with the rest of the file - Distinguish RecvError::Lagged from RecvError::Closed: lagged just means we missed some events (log warning and continue), while closed means the channel is gone (log error and break)
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Addresses review feedback from CodeRabbit on #433:
1. Consistent logging macros
Replaced
tracing::error!withlog::error!to match the rest ofmanager.rswhich uses thelogcrate throughout.2. Handle
RecvError::LaggedvsRecvError::ClosedseparatelyPreviously, any
broadcast::RecvErrorwas treated as fatal (broke the loop). Now:RecvError::Lagged(n): Log a warning with the count and continue. Lagged just means we missed some broadcast events — not fatal.RecvError::Closed: Log an error and break. The channel is gone, maintenance loop should stop.🤖 This was generated by an automated review bot.
Don't want automated PRs or comments on your code? You can opt out by replying here or messaging @PastaPastaPasta on Slack — we'll make sure the bot skips your PRs/repos going forward.