GoGoWen commented on a change in pull request #6932: URL: https://github.com/apache/incubator-doris/pull/6932#discussion_r736213504
########## File path: be/src/olap/schema_change.cpp ########## @@ -800,6 +803,15 @@ void RowBlockAllocator::release(RowBlock* row_block) { delete row_block; } +bool RowBlockAllocator::is_memory_enough_for_sorting(size_t num_rows, size_t allocated_rows){ + if (num_rows <= allocated_rows) { + return true; + } + size_t row_block_size = _row_len * (num_rows - allocated_rows); + return _memory_allocated + row_block_size < _memory_limitation; Review comment: yes, u'r right, should be _mem_tracker->consumption(). fixed -- 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