-
Notifications
You must be signed in to change notification settings - Fork 26
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
Improve service shutdown #381
Improve service shutdown #381
Conversation
@@ -106,7 +110,7 @@ void FiberTaskQueue::launch(task_pkg_t&& pkg) const | |||
boost::fibers::fiber fiber(std::move(pkg.first)); | |||
auto& props(fiber.properties<FiberPriorityProps>()); | |||
props.set_priority(pkg.second.priority); | |||
DVLOG(10) << *this << ": created fiber " << fiber.get_id() << " with priority " << pkg.second.priority; | |||
DVLOG(20) << *this << ": created fiber " << fiber.get_id() << " with priority " << pkg.second.priority; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: What is 10
and 20
here? Is there a name we could use that would provide more meaningful information?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No consistent meaning, but there is an issue for that already here: #76
|
||
template <typename MessageT> | ||
void issue_event(const protos::EventType& event_type, MessageT&& message); | ||
AsyncEventStatus issue_event(const protos::EventType& event_type, MessageT&& message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Rename to issue_event_async
if it is an async function as indicated by the return type.
|
||
void issue_event(const protos::EventType& event_type); | ||
AsyncEventStatus issue_event(const protos::EventType& event_type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Rename to issue_event_async
if it is an async function as indicated by the return type.
@@ -150,6 +198,8 @@ class Client final : public resources::PartitionResourceBase, public Service | |||
void request_update(); | |||
|
|||
private: | |||
AsyncEventStatus write_event(protos::Event event, bool await_response = false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Rename to write_event_async
if it is an async function as indicated by the return type.
~SimpleService() override | ||
{ | ||
if (m_do_call_in_destructor) | ||
{ | ||
Service::call_in_destructor(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: If m_do_call_in_destructor
and call_in_destructor
are both declared in Service
, why not have Service
's destructor container this logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
call_in_destructor
can call the virtual methods for stopping and killing. So you cant execute virtual functions in a base class destructor.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## branch-23.11 #381 +/- ##
================================================
+ Coverage 73.11% 73.54% +0.43%
================================================
Files 382 385 +3
Lines 13403 13640 +237
Branches 1010 1025 +15
================================================
+ Hits 9800 10032 +232
- Misses 3603 3608 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
* Based on fixes from @mdemoret-nv : https://github.com/mdemoret-nv/MRC/tree/mdd_control-plane-promises & #381 * Adopts updated versions of boost, clang & IWYU * Only run IWYU on files changed in PR * Use clang for checks stage * Allocate progress engine promises on the heap fixes #379 Authors: - David Gardner (https://github.com/dagardner-nv) - Michael Demoret (https://github.com/mdemoret-nv) Approvers: - Michael Demoret (https://github.com/mdemoret-nv) - Christopher Harris (https://github.com/cwharris) URL: #391
Closing since these changes are included in #391 which has been merged. |
Description
This PR incorporates several changes from the MNMG work into the current code base. The main goal of this PR was to eliminate the unnecessary warnings generated during tests. Such as:
This PR includes the following improvements (all taken from MNMG):
Service
classesService
classes to help with debuggingChecklist