Lchangliang commented on code in PR #32804:
URL: https://github.com/apache/doris/pull/32804#discussion_r1574076003


##########
be/src/cloud/cloud_backend_service.cpp:
##########
@@ -45,4 +57,137 @@ Status 
CloudBackendService::create_service(CloudStorageEngine& engine, ExecEnv*
     return Status::OK();
 }
 
+void CloudBackendService::sync_load_for_tablets(TSyncLoadForTabletsResponse&,
+                                                const 
TSyncLoadForTabletsRequest& request) {
+    auto f = [this, tablet_ids = request.tablet_ids]() {
+        std::for_each(tablet_ids.cbegin(), tablet_ids.cend(), [this](int64_t 
tablet_id) {
+            CloudTabletSPtr tablet;
+            auto result = _engine.tablet_mgr().get_tablet(tablet_id, true);
+            if (!result.has_value()) {
+                return;
+            }
+            Status st = result.value()->sync_rowsets(-1, true);
+            if (!st.ok()) {
+                LOG_WARNING("failed to sync load for tablet").error(st);
+            }
+        });
+    };
+    
static_cast<void>(_exec_env->sync_load_for_tablets_thread_pool()->submit_func(std::move(f)));
+}
+
+void 
CloudBackendService::get_top_n_hot_partitions(TGetTopNHotPartitionsResponse& 
response,
+                                                   const 
TGetTopNHotPartitionsRequest& request) {
+    TabletHotspot::instance()->get_top_n_hot_partition(&response.hot_tables);
+    response.file_cache_size = 
io::FileCacheFactory::instance()->get_capacity();
+    response.__isset.hot_tables = !response.hot_tables.empty();
+}
+
+void CloudBackendService::warm_up_tablets(TWarmUpTabletsResponse& response,
+                                          const TWarmUpTabletsRequest& 
request) {
+    Status st;
+    auto* manager = CloudWarmUpManager::instance();
+    switch (request.type) {
+    case TWarmUpTabletsRequestType::SET_JOB: {
+        LOG_INFO("receive the warm up request.")
+                .tag("request_type", "SET_JOB")
+                .tag("job_id", request.job_id);
+        st = manager->check_and_set_job_id(request.job_id);
+        if (!st) {
+            LOG_WARNING("SET_JOB failed.").error(st);
+            break;
+        }
+        [[fallthrough]];

Review Comment:
   When sending the first RPC, it contains SET_JOB and SET_BATCH params.



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