Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions be/src/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
1 change: 1 addition & 0 deletions be/src/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion be/src/olap/olap_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 """
Expand Down Expand Up @@ -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
})
}
}
Loading