You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/04/20 11:28:36 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #5651: [Compaction] Support to switching cumulative compaction policy dynamically

morningman commented on a change in pull request #5651:
URL: https://github.com/apache/incubator-doris/pull/5651#discussion_r616595505



##########
File path: be/src/olap/tablet.cpp
##########
@@ -725,7 +727,23 @@ const uint32_t Tablet::calc_compaction_score(CompactionType compaction_type) con
     }
 }
 
-const uint32_t Tablet::_calc_cumulative_compaction_score() const {
+const uint32_t Tablet::_calc_cumulative_compaction_score() {
+#ifndef BE_TEST
+    std::string current_policy = "";
+    {
+        std::lock_guard<std::mutex> lock(*config::get_mutable_string_config_lock());

Review comment:
       It's better to check the config at the beginning of each `_compaction_tasks_producer_callback` loop,
   instead of check it for each tablet.




-- 
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.

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



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