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 2020/08/10 16:20:37 UTC

[GitHub] [incubator-doris] ZhangYu0123 commented on a change in pull request #4312: Manually trigger compaction restapi interface

ZhangYu0123 commented on a change in pull request #4312:
URL: https://github.com/apache/incubator-doris/pull/4312#discussion_r468024804



##########
File path: be/src/http/action/compaction_action.h
##########
@@ -41,8 +52,25 @@ class CompactionAction : public HttpHandler {
 private:
     Status _handle_show_compaction(HttpRequest *req, std::string* json_result);
 
+    /// execute compaction request to run compaction task
+    /// param compact_type in req to distinguish the task type, base or cumulative
+    Status _handle_run_compaction(HttpRequest *req, std::string* json_result);
+
+    /// thread callback function for the tablet to do compaction
+    OLAPStatus _execute_compaction_callback(TabletSharedPtr tablet, const std::string& compaction_type);
+
+    /// fetch compaction running status
+    Status _handle_run_status_compaction(HttpRequest* req, std::string* json_result);
+
 private:
     CompactionActionType _type;
+
+    /// running check mutex
+    static std::mutex _compaction_running_mutex;
+    /// whether there is manual compaction running
+    static bool _is_compaction_running;

Review comment:
       already use mutex




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