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 2025/10/23 02:48:13 UTC
(doris) branch branch-4.0 updated: branch-4.0: [fix](segcompaction) Fix segcompaction coredump when adding key column #57162 (#57213)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new 4c4f82c182e branch-4.0: [fix](segcompaction) Fix segcompaction coredump when adding key column #57162 (#57213)
4c4f82c182e is described below
commit 4c4f82c182ebe2b19adfa2e84ab4757b87ad4839
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Thu Oct 23 10:48:07 2025 +0800
branch-4.0: [fix](segcompaction) Fix segcompaction coredump when adding key column #57162 (#57213)
Cherry-picked from #57162
Co-authored-by: Siyang Tang <ta...@selectdb.com>
---
be/src/olap/rowset/rowset_writer_context.h | 4 ++--
be/src/olap/rowset_builder.cpp | 1 +
be/test/olap/segcompaction_mow_test.cpp | 1 +
be/test/olap/segcompaction_test.cpp | 1 +
4 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/be/src/olap/rowset/rowset_writer_context.h b/be/src/olap/rowset/rowset_writer_context.h
index ebc6be93d48..b61f52d9632 100644
--- a/be/src/olap/rowset/rowset_writer_context.h
+++ b/be/src/olap/rowset/rowset_writer_context.h
@@ -107,8 +107,8 @@ struct RowsetWriterContext {
uint64_t approximate_bytes_to_write = 0;
/// end file cache opts
- // segcompaction for this RowsetWriter, disable it for some transient writers
- bool enable_segcompaction = true;
+ // segcompaction for this RowsetWriter, only enabled when importing data
+ bool enable_segcompaction = false;
std::shared_ptr<PartialUpdateInfo> partial_update_info;
diff --git a/be/src/olap/rowset_builder.cpp b/be/src/olap/rowset_builder.cpp
index 070732f4a60..474ecabc532 100644
--- a/be/src/olap/rowset_builder.cpp
+++ b/be/src/olap/rowset_builder.cpp
@@ -223,6 +223,7 @@ Status RowsetBuilder::init() {
context.tablet_id = _req.tablet_id;
context.index_id = _req.index_id;
context.tablet = _tablet;
+ context.enable_segcompaction = true;
context.write_type = DataWriteType::TYPE_DIRECT;
context.mow_context = mow_context;
context.write_file_cache = _req.write_file_cache;
diff --git a/be/test/olap/segcompaction_mow_test.cpp b/be/test/olap/segcompaction_mow_test.cpp
index 2a4302b6269..a7e3c9fd706 100644
--- a/be/test/olap/segcompaction_mow_test.cpp
+++ b/be/test/olap/segcompaction_mow_test.cpp
@@ -213,6 +213,7 @@ protected:
auto tablet = std::make_shared<Tablet>(*s_engine, tablet_meta, _data_dir.get(), "test_str");
// tablet->key
rowset_writer_context->tablet = tablet;
+ rowset_writer_context->enable_segcompaction = true;
}
void create_and_init_rowset_reader(Rowset* rowset, RowsetReaderContext& context,
diff --git a/be/test/olap/segcompaction_test.cpp b/be/test/olap/segcompaction_test.cpp
index 065d2119060..698d3645be6 100644
--- a/be/test/olap/segcompaction_test.cpp
+++ b/be/test/olap/segcompaction_test.cpp
@@ -262,6 +262,7 @@ protected:
auto tablet = std::make_shared<Tablet>(*l_engine, tablet_meta, _data_dir.get(), "test_str");
// tablet->key
rowset_writer_context->tablet = tablet;
+ rowset_writer_context->enable_segcompaction = true;
}
void create_and_init_rowset_reader(Rowset* rowset, RowsetReaderContext& context,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org