morningman commented on a change in pull request #8322: URL: https://github.com/apache/incubator-doris/pull/8322#discussion_r820197198
########## File path: be/src/exprs/expr_context.cpp ########## @@ -371,10 +376,11 @@ Status ExprContext::get_const_value(RuntimeState* state, Expr& expr, AnyVal** co StringVal* sv = reinterpret_cast<StringVal*>(*const_val); if (!sv->is_null && sv->len > 0) { // Make sure the memory is owned by this evaluator. - char* ptr_copy = reinterpret_cast<char*>(_pool->try_allocate(sv->len)); + Status rst; + char* ptr_copy = reinterpret_cast<char*>(_pool->try_allocate(sv->len, &rst)); if (ptr_copy == nullptr) { - return _pool->mem_tracker()->MemLimitExceeded( - state, "Could not allocate constant string value", sv->len); + RETURN_ALLOC_LIMIT_EXCEEDED(_pool->mem_tracker(), state, Review comment: what is the difference between `RETURN_LIMIT_EXCEEDED` and `RETURN_ALLOC_LIMIT_EXCEEDED` ########## File path: be/src/exec/es/es_scroll_parser.cpp ########## @@ -410,11 +411,12 @@ Status ScrollParser::fill_tuple(const TupleDescriptor* tuple_desc, Tuple* tuple, } } size_t val_size = val.length(); - char* buffer = reinterpret_cast<char*>(tuple_pool->try_allocate_unaligned(val_size)); + Status rst; + char* buffer = reinterpret_cast<char*>(tuple_pool->try_allocate_unaligned(val_size, &rst)); Review comment: why not return Status and use `buffer` as parameter? ########## File path: be/src/olap/task/engine_alter_tablet_task.cpp ########## @@ -18,13 +18,21 @@ #include "olap/task/engine_alter_tablet_task.h" #include "olap/schema_change.h" +#include "runtime/mem_tracker.h" namespace doris { using std::to_string; EngineAlterTabletTask::EngineAlterTabletTask(const TAlterTabletReqV2& request) - : _alter_tablet_req(request) {} + : _alter_tablet_req(request) { + _mem_tracker = MemTracker::create_tracker( Review comment: This memtracker is not used ########## File path: be/src/olap/task/engine_batch_load_task.h ########## @@ -76,6 +76,8 @@ class EngineBatchLoadTask : public EngineTask { AgentStatus* _res_status; std::string _remote_file_path; std::string _local_file_path; + + std::shared_ptr<MemTracker> _mem_tracker; Review comment: not used? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org