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 c99750ba561 branch-4.0: [chore](cold) add a score threshold for cold
data compaction #55333 (#57218)
c99750ba561 is described below
commit c99750ba561057fc3b4f5719056c76dd8d7c6e33
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Oct 23 17:57:34 2025 +0800
branch-4.0: [chore](cold) add a score threshold for cold data compaction
#55333 (#57218)
Cherry-picked from #55333
Co-authored-by: Yongqiang YANG <[email protected]>
---
be/src/common/config.cpp | 1 +
be/src/common/config.h | 1 +
be/src/olap/olap_server.cpp | 2 +-
.../suites/cold_heat_separation/cold_data_compaction.groovy | 6 ++++++
4 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp
index 32683dc132e..9fedd42fc17 100644
--- a/be/src/common/config.cpp
+++ b/be/src/common/config.cpp
@@ -1019,6 +1019,7 @@ DEFINE_mInt32(remove_unused_remote_files_interval_sec,
"21600"); // 6h
DEFINE_mInt32(confirm_unused_remote_files_interval_sec, "60");
DEFINE_Int32(cold_data_compaction_thread_num, "2");
DEFINE_mInt32(cold_data_compaction_interval_sec, "1800");
+DEFINE_mInt32(cold_data_compaction_score_threshold, "100");
DEFINE_String(tmp_file_dir, "tmp");
diff --git a/be/src/common/config.h b/be/src/common/config.h
index afba63bebe5..a3e29007150 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -1045,6 +1045,7 @@ DECLARE_mInt32(remove_unused_remote_files_interval_sec);
// 6h
DECLARE_mInt32(confirm_unused_remote_files_interval_sec);
DECLARE_Int32(cold_data_compaction_thread_num);
DECLARE_mInt32(cold_data_compaction_interval_sec);
+DECLARE_mInt32(cold_data_compaction_score_threshold);
DECLARE_Int32(min_s3_file_system_thread_num);
DECLARE_Int32(max_s3_file_system_thread_num);
diff --git a/be/src/olap/olap_server.cpp b/be/src/olap/olap_server.cpp
index 906cffc9a42..149131bee3f 100644
--- a/be/src/olap/olap_server.cpp
+++ b/be/src/olap/olap_server.cpp
@@ -1545,7 +1545,7 @@ void
StorageEngine::_cold_data_compaction_producer_callback() {
for (auto& t : tablets) {
if (t->replica_id() ==
t->cooldown_conf_unlocked().cooldown_replica_id) {
auto score = t->calc_cold_data_compaction_score();
- if (score < 4) {
+ if (score < config::cold_data_compaction_score_threshold) {
continue;
}
tablet_to_compact.emplace_back(t, score);
diff --git
a/regression-test/suites/cold_heat_separation/cold_data_compaction.groovy
b/regression-test/suites/cold_heat_separation/cold_data_compaction.groovy
index d7bc2c2625c..2a3f23c6167 100644
--- a/regression-test/suites/cold_heat_separation/cold_data_compaction.groovy
+++ b/regression-test/suites/cold_heat_separation/cold_data_compaction.groovy
@@ -37,6 +37,11 @@ suite("test_cold_data_compaction", "nonConcurrent") {
}
}
+ def custoBeConfig = [
+ cold_data_compaction_score_threshold : 4
+ ]
+
+ setBeConfigTemporary(custoBeConfig) {
String suffix = UUID.randomUUID().hashCode().abs().toString()
String s3Prefix = "regression/cold_data_compaction"
multi_sql """
@@ -152,4 +157,5 @@ suite("test_cold_data_compaction", "nonConcurrent") {
logger.info("after drop t_recycle_in_s3, remote file number is
${filesAfterDrop.size()}")
return filesAfterDrop.size() == 0
})
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]