github-actions[bot] commented on code in PR #16258:
URL: https://github.com/apache/doris/pull/16258#discussion_r1098575376


##########
be/src/agent/task_worker_pool.cpp:
##########
@@ -268,7 +272,8 @@ void TaskWorkerPool::notify_thread() {
 }
 
 bool TaskWorkerPool::_register_task_info(const TTaskType::type task_type, 
int64_t signature) {
-    if (task_type == TTaskType::type::PUSH_STORAGE_POLICY) {
+    if (task_type == TTaskType::type::PUSH_STORAGE_POLICY
+            || TTaskType::type::COOLDOWN_DELETE_FILE) {

Review Comment:
   warning: converting the enum constant to a boolean 
[clang-diagnostic-int-in-bool-context]
   ```cpp
               || TTaskType::type::COOLDOWN_DELETE_FILE) {
               ^
   ```
   



##########
be/src/agent/task_worker_pool.cpp:
##########
@@ -1701,6 +1706,37 @@
     }
 }
 
+void TaskWorkerPool::_cooldown_delete_file_worker_thread_callback() {
+    while (_is_work) {
+        TAgentTaskRequest agent_task_req;
+        {
+            std::unique_lock<std::mutex> 
worker_thread_lock(_worker_thread_lock);
+            while (_is_work && _tasks.empty()) {
+                _worker_thread_condition_variable.wait(worker_thread_lock);
+            }
+            if (!_is_work) {
+                return;
+            }
+
+            agent_task_req = _tasks.front();
+            _tasks.pop_front();
+        }
+
+        TCooldownDeleteFileReq& cooldown_delete_file_req = 
agent_task_req.cooldown_delete_file;
+        for (auto& delete_file : 
cooldown_delete_file_req.cooldown_delete_files) {
+            int64_t tablet_id = delete_file.tablet_id;
+            TabletSharedPtr tablet =
+                    
StorageEngine::instance()->tablet_manager()->get_tablet(tablet_id);
+            if (tablet == nullptr) {
+                LOG(WARNING) << "failed to get tablet. tablet_id=" << 
tablet_id;
+                continue;
+            }
+            tablet->enable_cooldown_flag(delete_file.delete_id);

Review Comment:
   warning: 'enable_cooldown_flag' is a private member of 'doris::Tablet' 
[clang-diagnostic-error]
   ```cpp
               tablet->enable_cooldown_flag(delete_file.delete_id);
                       ^
   ```
   **be/src/olap/tablet.h:404:** declared private here
   ```cpp
       void enable_cooldown_flag(const TUniqueId& cooldown_delete_id);
            ^
   ```
   



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

Reply via email to