This is an automated email from the ASF dual-hosted git repository. yangbowen pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new 683600e8b14 [cherrypick](schema-change) cherrypick to Reserve some memory for use by other par… (#39995) 683600e8b14 is described below commit 683600e8b1447a1785d95b3a4505a472b6baf469 Author: GoGoWen <82132356+gogo...@users.noreply.github.com> AuthorDate: Tue Aug 27 20:35:38 2024 +0800 [cherrypick](schema-change) cherrypick to Reserve some memory for use by other par… (#39995) cp #27800 to fix schema change failure Co-authored-by: Pxl <pxl...@qq.com> --- be/src/olap/schema_change.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/be/src/olap/schema_change.cpp b/be/src/olap/schema_change.cpp index 9d2b3b94a48..31d3f0a32c8 100644 --- a/be/src/olap/schema_change.cpp +++ b/be/src/olap/schema_change.cpp @@ -595,7 +595,11 @@ Status VSchemaChangeWithSorting::_inner_process(RowsetReaderSharedPtr rowset_rea } RETURN_IF_ERROR(_changer.change_block(ref_block.get(), new_block.get())); - if (_mem_tracker->consumption() + new_block->allocated_bytes() > _memory_limitation) { + + constexpr double HOLD_BLOCK_MEMORY_RATE = + 0.66; // Reserve some memory for use by other parts of this job + if (_mem_tracker->consumption() + new_block->allocated_bytes() > _memory_limitation || + _mem_tracker->consumption() > _memory_limitation * HOLD_BLOCK_MEMORY_RATE) { RETURN_IF_ERROR(create_rowset()); if (_mem_tracker->consumption() + new_block->allocated_bytes() > _memory_limitation) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org