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
DISPATCH-1509: free core agent timer on shutdown #668
Conversation
qdr_manage_response_t agent_response_handler; | ||
qdr_subscription_t *agent_subscription_mobile; | ||
qdr_subscription_t *agent_subscription_local; | ||
qdr_agent_t *agent; |
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.
I wonder if this should be mgmt_agent instead of just agent because it is used to respond exclusively to management requests coming in on $management
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.
+1
@@ -920,7 +913,9 @@ void *router_core_thread(void *arg); | |||
uint64_t qdr_identifier(qdr_core_t* core); | |||
void qdr_management_agent_on_message(void *context, qd_message_t *msg, int link_id, int cost, uint64_t in_conn_id); | |||
void qdr_route_table_setup_CT(qdr_core_t *core); | |||
void qdr_agent_setup_CT(qdr_core_t *core); | |||
qdr_agent_t *qdr_agent(qdr_core_t *core); |
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.
Should this be called qdr_agent_CT instead?
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 - it's called before the core thread is running.
6c2c30e
to
1d8c723
Compare
Codecov Report
@@ Coverage Diff @@
## master #668 +/- ##
==========================================
+ Coverage 86.83% 86.89% +0.05%
==========================================
Files 92 92
Lines 21027 21046 +19
==========================================
+ Hits 18258 18287 +29
+ Misses 2769 2759 -10
Continue to review full report at Codecov.
|
Re-factor the management agent code by making the qdr_agent_t structure private and adding setup and teardown APIs.
1d8c723
to
8d3d128
Compare
Refactored the core agent code by pulling out the agent fields from qdr_core_t and putting them in their own private structure with setup/cleanup methods.