You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2021/03/27 11:01:47 UTC

[incubator-doris] branch master updated: [Compaction] Optimize cumulative compaction point calculate when after restart be (#5561)

This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 1ddaac7  [Compaction] Optimize cumulative compaction point calculate when after restart be (#5561)
1ddaac7 is described below

commit 1ddaac7832aee95ee32db4fd5c5ad2cf1c90a187
Author: weihongkai2008 <we...@hotmail.com>
AuthorDate: Sat Mar 27 18:59:50 2021 +0800

    [Compaction] Optimize cumulative compaction point calculate when after restart be (#5561)
    
    This pr is to reduce a large number of useless cumulative compactions caused by
    cumulative compaction point calculation problems after be restarts.
---
 be/src/olap/cumulative_compaction_policy.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/be/src/olap/cumulative_compaction_policy.cpp b/be/src/olap/cumulative_compaction_policy.cpp
index 1f026ab..e6e9392 100644
--- a/be/src/olap/cumulative_compaction_policy.cpp
+++ b/be/src/olap/cumulative_compaction_policy.cpp
@@ -83,8 +83,8 @@ void SizeBasedCumulativeCompactionPolicy::calculate_cumulative_point(
 
         bool is_delete = tablet->version_for_delete_predicate(rs->version());
 
-        // break the loop if segments in this rowset is overlapping, or is a singleton.
-        if (!is_delete && (rs->is_segments_overlapping() || rs->is_singleton_delta())) {
+        // break the loop if segments in this rowset is overlapping.
+        if (!is_delete && rs->is_segments_overlapping()) {
             *ret_cumulative_point = rs->version().first;
             break;
         }
@@ -95,6 +95,7 @@ void SizeBasedCumulativeCompactionPolicy::calculate_cumulative_point(
             break;
         }
 
+        // include one situation: When the segment is not deleted, and is singleton delta, and is NONOVERLAPPING, ret_cumulative_point increase 
         prev_version = rs->version().second;
         *ret_cumulative_point = prev_version + 1;
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org