Classify errors by severity and discard messages that cannot be read - #35
Open
KevinWahle wants to merge 1 commit into
Open
Classify errors by severity and discard messages that cannot be read#35KevinWahle wants to merge 1 commit into
KevinWahle wants to merge 1 commit into
Conversation
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.
Changes
BrokerErrorwas a flat enum so the client turned anything out oftick()into a shutdown.Each error type now answers
severity(),FatalorNonFatalorProgramming, Borderline cases are non-fatal, since guessing wrong that way costs a log line while guessing wrong the other way stops an operator that had no need to stop.Along the way three variants that were never constructed are gone,
IoErrorbecameConnectErrorwith an explicitBindErrorat the two startup sites,Otherretired intoLocalChannelForOwnId, andReceivedMessage::Erroris removed since nothing ever produced it.Severity on its own would only convert a crash into a permanent stall, because a message that failed to parse was never removed and came back on every tick, leaving the process alive, logging and doing nothing. Messages that cannot be read are now discarded before the error travels, so a bad message costs one tick instead of the queue forever, and
store_in_msgsskips a message it cannot key rather than rolling back the whole batch.