This repository was archived by the owner on Dec 9, 2025. It is now read-only.
Reduce amount of error topics to one per impl#225
Merged
hikinggrass merged 6 commits intomainfrom Jan 27, 2025
Merged
Conversation
Removing the split between error raising and error clearing topics helps with preserving the order of these operations Reducing the amount of topics, and therefore handlers, also reduces the amount of threads a module using error handling is spawning considerably Signed-off-by: Kai-Uwe Hermann <kai-uwe.hermann@pionix.de>
…efactor # Conflicts: # lib/everest.cpp Signed-off-by: Kai-Uwe Hermann <kai-uwe.hermann@pionix.de>
andistorm
suggested changes
Jan 17, 2025
Member
andistorm
left a comment
There was a problem hiding this comment.
LGTM in general. Two things I would like to see changed.
I didn't run it but tests should cover this, code looks fine to me.
Comment on lines
+655
to
+669
| switch (error.state) { | ||
| case error::State::Active: | ||
| EVLOG_debug << fmt::format( | ||
| "Incoming error {}->{}", | ||
| this->config.printable_identifier(error.origin.module_id, error.origin.implementation_id), error.type); | ||
| callback(error); | ||
| break; | ||
| case error::State::ClearedByModule: | ||
| case error::State::ClearedByReboot: | ||
| EVLOG_debug << fmt::format( | ||
| "Incoming error cleared {}->{}", | ||
| this->config.printable_identifier(error.origin.module_id, error.origin.implementation_id), error.type); | ||
| clear_callback(error); | ||
| break; | ||
| } |
Member
There was a problem hiding this comment.
This part of the handler can probably be shared with the other one
…efactor Signed-off-by: Kai-Uwe Hermann <kai-uwe.hermann@pionix.de>
Signed-off-by: Kai-Uwe Hermann <kai-uwe.hermann@pionix.de>
Signed-off-by: Kai-Uwe Hermann <kai-uwe.hermann@pionix.de>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Removing the split between error raising and error clearing topics helps with preserving the order of these operations
Reducing the amount of topics, and therefore handlers, also reduces the amount of threads a module using error handling is spawning considerably