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
4 changes: 2 additions & 2 deletions be/src/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,10 @@ namespace config {
// rowset will be not given to base compaction. The unit is m byte.
CONF_mInt64(cumulative_size_based_promotion_min_size_mbytes, "64");
// The lower bound size to do cumulative compaction. When total disk size of candidate rowsets is less than
// this size, size_based policy also does cumulative compaction. The unit is m byte.
// this size, size_based policy may not do to cumulative compaction. The unit is m byte.
CONF_mInt64(cumulative_size_based_compaction_lower_size_mbytes, "64");

// cumulative compaction policy: max delta file's size unit:B
// cumulative compaction policy: min and max delta file's number
CONF_mInt64(min_cumulative_compaction_num_singleton_deltas, "5");
CONF_mInt64(max_cumulative_compaction_num_singleton_deltas, "1000");
CONF_mInt64(cumulative_compaction_budgeted_bytes, "104857600");
Expand Down
2 changes: 1 addition & 1 deletion be/src/olap/cumulative_compaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ OLAPStatus CumulativeCompaction::compact() {
// 1.calculate cumulative point
_tablet->calculate_cumulative_point();
TRACE("calculated cumulative point");
LOG(INFO) << "after calculate, current cumulative point is " << _tablet->cumulative_layer_point()
VLOG(1) << "after calculate, current cumulative point is " << _tablet->cumulative_layer_point()
<< ", tablet=" << _tablet->full_name() ;

// 2. pick rowsets to compact
Expand Down
4 changes: 2 additions & 2 deletions be/src/olap/cumulative_compaction_policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ int SizeBasedCumulativeCompactionPolicy::pick_input_rowsets(
rs_iter = input_rowsets->erase(rs_iter);
}

LOG(INFO) << "cumulative compaction size_based policy, compaction_score = " << *compaction_score
VLOG(1) << "cumulative compaction size_based policy, compaction_score = " << *compaction_score
<< ", total_size = " << total_size
<< ", calc promotion size value = " << promotion_size
<< ", tablet = " << tablet->full_name() << ", input_rowset size "
Expand Down Expand Up @@ -467,4 +467,4 @@ void CumulativeCompactionPolicyFactory::_parse_cumulative_compaction_policy(std:
*policy_type = NUM_BASED_POLICY;
}
}
}
}
9 changes: 6 additions & 3 deletions be/src/olap/olap_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,12 @@ void StorageEngine::_compaction_tasks_producer_callback() {
for (const auto& tablet : tablets_compaction) {
int64_t permits = tablet->calc_compaction_score(compaction_type);
if (_permit_limiter.request(permits)) {
{
// Push to _tablet_submitted_compaction before submitting task
std::unique_lock<std::mutex> lock(_tablet_submitted_compaction_mutex);
_tablet_submitted_compaction[tablet->data_dir()].emplace_back(
tablet->tablet_id());
}
if (compaction_type == CompactionType::CUMULATIVE_COMPACTION) {
_compaction_thread_pool->submit_func([=]() {
CgroupsMgr::apply_system_cgroup();
Expand Down Expand Up @@ -386,9 +392,6 @@ void StorageEngine::_compaction_tasks_producer_callback() {
}
});
}
std::unique_lock<std::mutex> lock(_tablet_submitted_compaction_mutex);
_tablet_submitted_compaction[tablet->data_dir()].emplace_back(
tablet->tablet_id());
}
}
} else {
Expand Down
1 change: 1 addition & 0 deletions be/src/olap/tablet_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,7 @@ TabletSharedPtr TabletManager::find_best_tablet_to_compaction(
VLOG(1) << "Found the best tablet for compaction. "
<< "compaction_type=" << compaction_type_str
<< ", tablet_id=" << best_tablet->tablet_id()
<< ", path=" << data_dir->path()
<< ", highest_score=" << highest_score;
// TODO(lingbin): Remove 'max' from metric name, it would be misunderstood as the
// biggest in history(like peak), but it is really just the value at current moment.
Expand Down