This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 b7612ab0d9c [chore](cold) add a score threshold for cold data
compaction (#55333)
b7612ab0d9c is described below
commit b7612ab0d9c63246ca975f39ad04a76b503838d4
Author: Yongqiang YANG <[email protected]>
AuthorDate: Wed Oct 22 11:24:58 2025 +0800
[chore](cold) add a score threshold for cold data compaction (#55333)
---
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 1d905cf283b..32b3c5cbc46 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 ea5fe2204ea..1c93dd513a7 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]