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 42c7d39  [Revert] "[Enhancement] Modify the method of calculating 
compaction score (#6252)" (#6748)
42c7d39 is described below

commit 42c7d39faa962218ea3ff3821033544ef3501778
Author: Mingyu Chen <[email protected]>
AuthorDate: Mon Sep 27 10:35:19 2021 +0800

    [Revert] "[Enhancement] Modify the method of calculating compaction score 
(#6252)" (#6748)
    
    This reverts commit dedb57f87e31305db3e2a13e374ba4fd58043fca.
    Reverts #6252
    
    This commit may cause tablet which segments are all empty never to 
compaction, and results in -235 error.
    I will revert this commit, and the problem will be solved in #6671
---
 be/src/olap/rowset/rowset_meta.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/be/src/olap/rowset/rowset_meta.h b/be/src/olap/rowset/rowset_meta.h
index 2c9fcfb..a31f14e2 100644
--- a/be/src/olap/rowset/rowset_meta.h
+++ b/be/src/olap/rowset/rowset_meta.h
@@ -265,14 +265,15 @@ public:
     }
 
     // get the compaction score of this rowset.
-    // if segments are overlapping or the number of segments is 0, the score 
equals to the number of segments,
+    // if segments are overlapping, the score equals to the number of segments,
     // otherwise, score is 1.
     uint32_t get_compaction_score() const {
         uint32_t score = 0;
-        if ((num_segments() > 0 && !is_segments_overlapping()) || 
has_delete_predicate()) {
+        if (!is_segments_overlapping()) {
             score = 1;
         } else {
             score = num_segments();
+            CHECK(score > 0);
         }
         return score;
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to