This is an automated email from the ASF dual-hosted git repository.
panxiaolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 96f2ef3d992 [Improvement](schema-change) Reserve some memory for use
by other parts except hold block of schem… (#27800)
96f2ef3d992 is described below
commit 96f2ef3d9925aff186cc148fba5501101e073983
Author: Pxl <[email protected]>
AuthorDate: Thu Nov 30 17:01:51 2023 +0800
[Improvement](schema-change) Reserve some memory for use by other parts
except hold block of schem… (#27800)
Reserve some memory for use by other parts except hold block of schema
change job
---
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 40cf4f9f88d..8d96f68bb6d 100644
--- a/be/src/olap/schema_change.cpp
+++ b/be/src/olap/schema_change.cpp
@@ -555,7 +555,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: [email protected]
For additional commands, e-mail: [email protected]