[feature-wip] (memory tracker) (step4) Switch TLS mem tracker to separate more detailed memory usage (#8669)

Based on #8605, Separate out the memory usage of each operator from the Query/Load/StorageEngine mem tracker.
This commit is contained in:
Xinyi Zou
2022-04-08 09:02:26 +08:00
committed by GitHub
parent 7fb4b6a6e2
commit 519305cb22
79 changed files with 378 additions and 150 deletions

View File

@ -49,6 +49,7 @@ Status AssertNumRowsNode::prepare(RuntimeState* state) {
Status AssertNumRowsNode::open(RuntimeState* state) {
SCOPED_TIMER(_runtime_profile->total_time_counter());
SCOPED_SWITCH_TASK_THREAD_LOCAL_MEM_TRACKER(mem_tracker());
RETURN_IF_ERROR(ExecNode::open(state));
// ISSUE-3435
RETURN_IF_ERROR(child(0)->open(state));
@ -58,6 +59,7 @@ Status AssertNumRowsNode::open(RuntimeState* state) {
Status AssertNumRowsNode::get_next(RuntimeState* state, RowBatch* output_batch, bool* eos) {
RETURN_IF_ERROR(exec_debug_action(TExecNodePhase::GETNEXT));
SCOPED_TIMER(_runtime_profile->total_time_counter());
SCOPED_SWITCH_TASK_THREAD_LOCAL_EXISTED_MEM_TRACKER(mem_tracker());
output_batch->reset();
child(0)->get_next(state, output_batch, eos);
_num_rows_returned += output_batch->num_rows();