[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:
@ -55,6 +55,7 @@ Status OdbcScanNode::prepare(RuntimeState* state) {
|
||||
}
|
||||
|
||||
RETURN_IF_ERROR(ScanNode::prepare(state));
|
||||
SCOPED_SWITCH_TASK_THREAD_LOCAL_MEM_TRACKER(mem_tracker());
|
||||
// get tuple desc
|
||||
_tuple_desc = state->desc_tbl().get_tuple_descriptor(_tuple_id);
|
||||
|
||||
@ -92,6 +93,8 @@ Status OdbcScanNode::prepare(RuntimeState* state) {
|
||||
}
|
||||
|
||||
Status OdbcScanNode::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));
|
||||
VLOG_CRITICAL << _scan_node_type << "::Open";
|
||||
|
||||
@ -105,7 +108,6 @@ Status OdbcScanNode::open(RuntimeState* state) {
|
||||
|
||||
RETURN_IF_ERROR(exec_debug_action(TExecNodePhase::OPEN));
|
||||
RETURN_IF_CANCELLED(state);
|
||||
SCOPED_TIMER(_runtime_profile->total_time_counter());
|
||||
RETURN_IF_ERROR(_odbc_scanner->open());
|
||||
RETURN_IF_ERROR(_odbc_scanner->query());
|
||||
// check materialize slot num
|
||||
@ -140,6 +142,7 @@ Status OdbcScanNode::get_next(RuntimeState* state, RowBatch* row_batch, bool* eo
|
||||
RETURN_IF_ERROR(exec_debug_action(TExecNodePhase::GETNEXT));
|
||||
RETURN_IF_CANCELLED(state);
|
||||
SCOPED_TIMER(_runtime_profile->total_time_counter());
|
||||
SCOPED_SWITCH_TASK_THREAD_LOCAL_EXISTED_MEM_TRACKER(mem_tracker());
|
||||
|
||||
if (reached_limit()) {
|
||||
*eos = true;
|
||||
|
||||
Reference in New Issue
Block a user