weizuo93 commented on a change in pull request #4670:
URL: https://github.com/apache/incubator-doris/pull/4670#discussion_r495660105



##########
File path: be/src/olap/olap_server.cpp
##########
@@ -391,4 +313,70 @@ void StorageEngine::_tablet_checkpoint_callback(DataDir* 
data_dir) {
     } while 
(!_stop_background_threads_latch.wait_for(MonoDelta::FromSeconds(interval)));
 }
 
-}  // namespace doris
+void StorageEngine::_compaction_tasks_producer_callback() {
+#ifdef GOOGLE_PROFILER
+    ProfilerRegisterThread();
+#endif
+    LOG(INFO) << "try to start compaction producer process!";
+
+    std::vector<DataDir*> data_dirs;
+    for (auto& tmp_store : _store_map) {
+        data_dirs.push_back(tmp_store.second);
+    }
+
+    int round = 0;
+    CompactionType compaction_type;
+    do {
+        if (!config::disable_auto_compaction) {
+            if (round < 
config::cumulative_compaction_rounds_for_each_base_compaction_round) {

Review comment:
       Thanks for your suggestions! I optimized the implementation logic of my 
producer.  If all the compaction tasks produced can hold `permits`, the 
producer will continue to produce compaction tasks without sleep. In this way, 
the production speed can far meet consumer demand.




----------------------------------------------------------------
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:
[email protected]



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

Reply via email to