Skip to content
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
feature/error-topic-refactor
Jan 27, 2025
Merged

Reduce amount of error topics to one per impl#225
hikinggrass merged 6 commits intomainfrom
feature/error-topic-refactor

Conversation

@hikinggrass
Copy link
Member

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

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>
Copy link
Member

@andistorm andistorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part of the handler can probably be shared with the other one

andistorm and others added 4 commits January 17, 2025 02:56
…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>
Copy link
Member

@andistorm andistorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐧

@hikinggrass hikinggrass merged commit 84395f2 into main Jan 27, 2025
5 checks passed
@hikinggrass hikinggrass deleted the feature/error-topic-refactor branch January 27, 2025 20:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants