xinyiZzz commented on a change in pull request #8443: URL: https://github.com/apache/incubator-doris/pull/8443#discussion_r825325917
########## File path: be/src/exec/olap_scanner.cpp ########## @@ -257,13 +257,19 @@ Status OlapScanner::_init_return_columns() { Status OlapScanner::get_batch(RuntimeState* state, RowBatch* batch, bool* eof) { // 2. Allocate Row's Tuple buf + const std::string mem_err_msg("OlapSanner::get_batch memory over limit, " + "please increase exec_mem_limit"); uint8_t* tuple_buf = - batch->tuple_data_pool()->allocate(state->batch_size() * _tuple_desc->byte_size()); + batch->tuple_data_pool()->try_allocate(state->batch_size() * _tuple_desc->byte_size()); + if (tuple_buf == nullptr) { + return Status::MemoryLimitExceeded(mem_err_msg); Review comment: <img width="939" alt="image" src="https://user-images.githubusercontent.com/13197424/158027472-17dd6f11-3451-4c05-9695-ce4708b650e5.png"> Can consider returning the status of mem limit exceeded in this way, This will return more complete information including mem tracker statistics. -- 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