This is an automated email from the ASF dual-hosted git repository.
airborne pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 8ce30963cd5 [fix] (compaction) fix time series compaction policy
(#38220) (#38917)
8ce30963cd5 is described below
commit 8ce30963cd5c4e593e6aca5bb398be99bdbfbb58
Author: Sun Chenyang <[email protected]>
AuthorDate: Tue Aug 6 14:26:42 2024 +0800
[fix] (compaction) fix time series compaction policy (#38220) (#38917)
## Proposed changes
pick from #38220
---
be/src/olap/cumulative_compaction.cpp | 6 ++++--
be/src/olap/tablet.cpp | 7 +++++--
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/be/src/olap/cumulative_compaction.cpp
b/be/src/olap/cumulative_compaction.cpp
index f461de3a5e9..04504432f19 100644
--- a/be/src/olap/cumulative_compaction.cpp
+++ b/be/src/olap/cumulative_compaction.cpp
@@ -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(
diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp
index 11cb7055c7f..1121e61451a 100644
--- a/be/src/olap/tablet.cpp
+++ b/be/src/olap/tablet.cpp
@@ -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();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]