## Proposed changes pick from #38220
This commit is contained in:
@ -82,8 +82,10 @@ Status CumulativeCompaction::execute_compact_impl() {
|
||||
_state = CompactionState::SUCCESS;
|
||||
|
||||
// 5. set cumulative level
|
||||
_tablet->cumulative_compaction_policy()->update_compaction_level(_tablet.get(), _input_rowsets,
|
||||
_output_rowset);
|
||||
if (_tablet->tablet_meta()->time_series_compaction_level_threshold() >= 2) {
|
||||
_tablet->cumulative_compaction_policy()->update_compaction_level(
|
||||
_tablet.get(), _input_rowsets, _output_rowset);
|
||||
}
|
||||
|
||||
// 6. set cumulative point
|
||||
_tablet->cumulative_compaction_policy()->update_cumulative_point(
|
||||
|
||||
@ -1997,8 +1997,11 @@ Status Tablet::prepare_compaction_and_calculate_permits(CompactionType compactio
|
||||
}
|
||||
|
||||
permits = 0;
|
||||
for (auto&& rowset : compaction->input_rowsets()) {
|
||||
permits += rowset->rowset_meta()->get_compaction_score();
|
||||
// Time series policy does not rely on permits, it uses goal size to control memory
|
||||
if (tablet->tablet_meta()->compaction_policy() != CUMULATIVE_TIME_SERIES_POLICY) {
|
||||
for (auto&& rowset : compaction->input_rowsets()) {
|
||||
permits += rowset->rowset_meta()->get_compaction_score();
|
||||
}
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user