csun5285 commented on code in PR #34315:
URL: https://github.com/apache/doris/pull/34315#discussion_r1597457557


##########
be/src/olap/olap_server.cpp:
##########
@@ -894,23 +894,25 @@ std::vector<TabletSharedPtr> 
StorageEngine::_generate_compaction_tasks(
         // So that we can update the max_compaction_score metric.
         if (!data_dir->reach_capacity_limit(0)) {
             uint32_t disk_max_score = 0;
-            TabletSharedPtr tablet = 
_tablet_manager->find_best_tablet_to_compaction(
+            auto tablets = _tablet_manager->find_best_tablets_to_compaction(
                     compaction_type, data_dir,
                     compaction_type == CompactionType::CUMULATIVE_COMPACTION
                             ? copied_cumu_map[data_dir]
                             : copied_base_map[data_dir],
                     &disk_max_score, _cumulative_compaction_policies);
-            if (tablet != nullptr) {
-                if 
(!tablet->tablet_meta()->tablet_schema()->disable_auto_compaction()) {
-                    if (need_pick_tablet) {
-                        tablets_compaction.emplace_back(tablet);
+            for (const auto& tablet : tablets) {

Review Comment:
   "Reserve at least one Slot for cumulative compaction" means 
need_pick_tablet=false, even if two tablets are generated here, they will not 
be picked up
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to