Skip to content
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

Merged
merged 1 commit into from Jan 22, 2020

Conversation

kgiusti
Copy link
Contributor

@kgiusti kgiusti commented Jan 20, 2020

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.

qdr_manage_response_t agent_response_handler;
qdr_subscription_t *agent_subscription_mobile;
qdr_subscription_t *agent_subscription_local;
qdr_agent_t *agent;
Copy link
Contributor

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

Copy link
Contributor Author

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);
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@codecov-io
Copy link

Codecov Report

Merging #668 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/router_core/router_core_thread.c 100% <ø> (ø) ⬆️
src/router_core/router_core.c 86.49% <100%> (+1.67%) ⬆️
src/router_core/agent.c 87.95% <100%> (+0.84%) ⬆️
src/router_core/agent_address.c 88.18% <0%> (-1.58%) ⬇️
src/router_core/transfer.c 93.41% <0%> (-0.49%) ⬇️
src/router_core/connections.c 93.58% <0%> (-0.34%) ⬇️
src/router_node.c 93.24% <0%> (ø) ⬆️
src/router_core/modules/mobile_sync/mobile.c 94.84% <0%> (+0.06%) ⬆️
src/router_core/delivery.c 90.22% <0%> (+0.56%) ⬆️
src/router_core/route_tables.c 80.52% <0%> (+0.58%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e4c8d8...1d8c723. Read the comment docs.

Re-factor the management agent code by making the qdr_agent_t
structure private and adding setup and teardown APIs.
@kgiusti kgiusti merged commit 4636f35 into apache:master Jan 22, 2020
@kgiusti kgiusti deleted the DISPATCH-1509 branch January 22, 2020 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants