This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 0d2ab9d5c3f [fix](clean trash) Fix clean trash lost submit task 
(#35271)
0d2ab9d5c3f is described below

commit 0d2ab9d5c3fb4634e4c8c04320a8d9fa9a5e50b8
Author: deardeng <[email protected]>
AuthorDate: Thu May 23 16:27:20 2024 +0800

    [fix](clean trash) Fix clean trash lost submit task (#35271)
---
 be/src/agent/agent_server.cpp | 10 +++++++++-
 be/src/agent/agent_server.h   |  2 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/be/src/agent/agent_server.cpp b/be/src/agent/agent_server.cpp
index e94d4c349a9..e7217cdcff0 100644
--- a/be/src/agent/agent_server.cpp
+++ b/be/src/agent/agent_server.cpp
@@ -161,7 +161,7 @@ void AgentServer::start_workers(ExecEnv* exec_env) {
     _report_tablet_workers = std::make_unique<ReportWorker>(
             "REPORT_OLAP_TABLE", _master_info, 
config::report_tablet_interval_seconds,[&engine, &master_info = _master_info] { 
report_tablet_callback(engine, master_info); });
 
-    _clean_trash_binlog_workers = std::make_unique<TaskWorkerPool>(
+    _clean_trash_workers = std::make_unique<TaskWorkerPool>(
             "CLEAN_TRASH", 1, [&engine](auto&& task) {return 
clean_trash_callback(engine, task); });
     // clang-format on
 }
@@ -270,6 +270,14 @@ void AgentServer::submit_tasks(TAgentResult& agent_result,
                         "task(signature={}) has wrong request member = 
gc_binlog_req", signature);
             }
             break;
+        case TTaskType::CLEAN_TRASH:
+            if (task.__isset.clean_trash_req) {
+                _clean_trash_workers->submit_task(task);
+            } else {
+                ret_st = Status::InvalidArgument(
+                        "task(signature={}) has wrong request member = 
clean_trash_req", signature);
+            }
+            break;
         default:
             ret_st = Status::InvalidArgument("task(signature={}, type={}) has 
wrong task type",
                                              signature, task_type);
diff --git a/be/src/agent/agent_server.h b/be/src/agent/agent_server.h
index 283d2118ce3..b789bbe98de 100644
--- a/be/src/agent/agent_server.h
+++ b/be/src/agent/agent_server.h
@@ -96,7 +96,7 @@ private:
     std::unique_ptr<TaskWorkerPool> _push_storage_policy_workers;
     std::unique_ptr<TopicSubscriber> _topic_subscriber;
     std::unique_ptr<TaskWorkerPool> _gc_binlog_workers;
-    std::unique_ptr<TaskWorkerPool> _clean_trash_binlog_workers;
+    std::unique_ptr<TaskWorkerPool> _clean_trash_workers;
 };
 
 } // end namespace doris


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

Reply via email to