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

gavinchou pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 3a50bde11b6 [fix](compaction) Filter out all not running tablets if 
cumu compaction for shadow tablets is disabled (#42245) (#43209)
3a50bde11b6 is described below

commit 3a50bde11b67dae8d5e02df9ffd00f73014c1de8
Author: Siyang Tang <[email protected]>
AuthorDate: Tue Nov 5 00:39:45 2024 +0800

    [fix](compaction) Filter out all not running tablets if cumu compaction for 
shadow tablets is disabled (#42245) (#43209)
    
    ## Proposed changes
    
    pick: #42245
    
    As title. If cumu compaction for shadow tablets is disabled, shadow
    tablets may be picked to do cumu compaction and result in error status.
---
 be/src/cloud/cloud_storage_engine.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/be/src/cloud/cloud_storage_engine.cpp 
b/be/src/cloud/cloud_storage_engine.cpp
index 4f452656a62..5d7b445917a 100644
--- a/be/src/cloud/cloud_storage_engine.cpp
+++ b/be/src/cloud/cloud_storage_engine.cpp
@@ -558,14 +558,16 @@ std::vector<CloudTabletSPtr> 
CloudStorageEngine::_generate_cloud_compaction_task
     } else if (config::enable_parallel_cumu_compaction) {
         filter_out = [&tablet_preparing_cumu_compaction](CloudTablet* t) {
             return tablet_preparing_cumu_compaction.contains(t->tablet_id()) ||
-                   (t->tablet_state() != TABLET_RUNNING && t->alter_version() 
== -1);
+                   (t->tablet_state() != TABLET_RUNNING &&
+                    (!config::enable_new_tablet_do_compaction || 
t->alter_version() == -1));
         };
     } else {
         filter_out = [&tablet_preparing_cumu_compaction,
                       &submitted_cumu_compactions](CloudTablet* t) {
             return tablet_preparing_cumu_compaction.contains(t->tablet_id()) ||
                    submitted_cumu_compactions.contains(t->tablet_id()) ||
-                   (t->tablet_state() != TABLET_RUNNING && t->alter_version() 
== -1);
+                   (t->tablet_state() != TABLET_RUNNING &&
+                    (!config::enable_new_tablet_do_compaction || 
t->alter_version() == -1));
         };
     }
 


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

Reply via email to