gavinchou commented on code in PR #13219: URL: https://github.com/apache/doris/pull/13219#discussion_r990761883
########## be/src/http/action/compaction_action.cpp: ########## @@ -94,18 +91,7 @@ Status CompactionAction::_handle_run_compaction(HttpRequest* req, std::string* j return _execute_compaction_callback(tablet, compaction_type); }); std::future<Status> future_obj = task.get_future(); - - { - // 3.1 check is there compaction running - std::lock_guard<std::mutex> lock(_compaction_running_mutex); - if (_is_compaction_running) { - return Status::TooManyTasks("Manual compaction task is running"); - } else { - // 3.2 execute the compaction task and set compaction task running - _is_compaction_running = true; - std::thread(std::move(task)).detach(); - } - } + std::thread(std::move(task)).detach(); Review Comment: Should we set a limit to it? e.g. count the number of running compaction, and limit with it. ``` std::packaged_task<Status()> task([this, tablet, compaction_type]() { ++static_cnt; std::shared_ptr<void> defer_cnt(nullptr, [](...) { --static_cnt; }); return _execute_compaction_callback(tablet, compaction_type); }); ``` -- 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