Reset current_memory_tracker when WNEstablishDisaggTaskHandler finished.#8174
Conversation
|
/run-all-tests |
| { | ||
| auto task = std::make_shared<std::packaged_task<void()>>( | ||
| [&handler, &request, &response, deadline = grpc_context->deadline()]() { | ||
| [db_context = db_context, &task_id, &request, &response, deadline = grpc_context->deadline()]() { |
There was a problem hiding this comment.
| [db_context = db_context, &task_id, &request, &response, deadline = grpc_context->deadline()]() { | |
| [&db_context, &task_id, &request, &response, deadline = grpc_context->deadline()]() { |
maybe better?
There was a problem hiding this comment.
'db_context' in capture list does not name a variable
Lambda could not capture structured binding in C++17.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: guo-shaoge, JaySon-Huang The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
|
/run-all-tests |
|
/cherry-pick release-7.4 |
|
@JaySon-Huang: new pull request created to branch DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
What problem does this PR solve?
Issue Number: close #8173
Problem Summary:
In
WNEstablishDisaggTaskHandler::execute, aProcessListElementobject will be created and setscurrent_memory_trackerto itsmemory_trackermember in constructor. Andcurrent_memory_trackerwill be reset in the destructor ofProcessListElement.However, objects of
ProcessListElementare created in threads ofWNEstablishDisaggTaskPool, but destructed in threads of GRPC because it will be destructed with object ofWNEstablishDisaggTaskHandler(handler->dag_context->process_list_entry).This result in
current_memory_trackerof threads ofWNEstablishDisaggTaskPoolis not reset after task finished and other tasks may continue to use this memory tracker, although it may have already been destructed.What is changed and how it works?
current_memory_trackerafter tasks ofWNEstablishDisaggTaskPoolfinished.Check List
Tests
Side effects
Documentation
Release note