You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2023/06/05 00:55:39 UTC
[doris] branch branch-1.2-lts updated: [improvement](load)disable shrink memory by default (#20299)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
new 7bd4d4ad3b [improvement](load)disable shrink memory by default (#20299)
7bd4d4ad3b is described below
commit 7bd4d4ad3bbc8b573ca8ca1cd945317153ba9b5a
Author: zxealous <zh...@baidu.com>
AuthorDate: Mon Jun 5 08:55:32 2023 +0800
[improvement](load)disable shrink memory by default (#20299)
cherry-pick #19714 into 1.2-lts
Issue Number: close #19204
disable shrink memory by default to avoid load slow
---
be/src/common/config.h | 3 +++
be/src/olap/delta_writer.cpp | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/be/src/common/config.h b/be/src/common/config.h
index eb663db838..1f437a4d58 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -918,6 +918,9 @@ CONF_Int32(max_depth_of_expr_tree, "600");
CONF_mBool(enable_stack_trace, "true");
+// enable shrink memory, default is false
+CONF_Bool(enable_shrink_memory, "false");
+
#ifdef BE_TEST
// test s3
CONF_String(test_s3_resource, "resource");
diff --git a/be/src/olap/delta_writer.cpp b/be/src/olap/delta_writer.cpp
index cdf572f4dc..ce3ad6a6b9 100644
--- a/be/src/olap/delta_writer.cpp
+++ b/be/src/olap/delta_writer.cpp
@@ -231,7 +231,9 @@ Status DeltaWriter::write(const vectorized::Block* block, const std::vector<int>
_mem_table->insert(block, row_idxs);
if (_mem_table->need_to_agg()) {
- _mem_table->shrink_memtable_by_agg();
+ if (config::enable_shrink_memory) {
+ _mem_table->shrink_memtable_by_agg();
+ }
if (_mem_table->is_flush()) {
auto s = _flush_memtable_async();
_reset_mem_table();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org