[enhancement] Refactor to improve the usability of MemTracker (step2) (#10823)
This commit is contained in:
@ -51,9 +51,9 @@ BlockingJoinNode::~BlockingJoinNode() {
|
||||
Status BlockingJoinNode::prepare(RuntimeState* state) {
|
||||
SCOPED_TIMER(_runtime_profile->total_time_counter());
|
||||
RETURN_IF_ERROR(ExecNode::prepare(state));
|
||||
SCOPED_SWITCH_TASK_THREAD_LOCAL_MEM_TRACKER(mem_tracker());
|
||||
SCOPED_CONSUME_MEM_TRACKER(mem_tracker());
|
||||
|
||||
_build_pool.reset(new MemPool(mem_tracker().get()));
|
||||
_build_pool.reset(new MemPool(mem_tracker()));
|
||||
_build_timer = ADD_TIMER(runtime_profile(), "BuildTime");
|
||||
_left_child_timer = ADD_TIMER(runtime_profile(), "LeftChildTime");
|
||||
_build_row_counter = ADD_COUNTER(runtime_profile(), "BuildRows", TUnit::UNIT);
|
||||
@ -89,14 +89,14 @@ Status BlockingJoinNode::close(RuntimeState* state) {
|
||||
}
|
||||
|
||||
void BlockingJoinNode::build_side_thread(RuntimeState* state, std::promise<Status>* status) {
|
||||
SCOPED_ATTACH_TASK_THREAD(state, mem_tracker());
|
||||
SCOPED_ATTACH_TASK(state);
|
||||
status->set_value(construct_build_side(state));
|
||||
}
|
||||
|
||||
Status BlockingJoinNode::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));
|
||||
SCOPED_CONSUME_MEM_TRACKER(mem_tracker());
|
||||
// RETURN_IF_ERROR(Expr::open(_conjuncts, state));
|
||||
|
||||
RETURN_IF_CANCELLED(state);
|
||||
|
||||
Reference in New Issue
Block a user