github-actions[bot] commented on code in PR #32804:
URL: https://github.com/apache/doris/pull/32804#discussion_r1559327877
##########
be/src/cloud/cloud_backend_service.cpp:
##########
@@ -45,4 +53,94 @@ 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,
Review Comment:
warning: method 'warm_up_tablets' can be made static
[readability-convert-member-functions-to-static]
```suggestion
static void CloudBackendService::warm_up_tablets(TWarmUpTabletsResponse&
response,
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]