Skip to content

Commit

Permalink
branch-3.0: [fix](routine load) replace heavy work pool with routine …
Browse files Browse the repository at this point in the history
…load thread pool for metadata fetching #44907 (#45039)

Cherry-picked from #44907

Co-authored-by: hui lai <[email protected]>
  • Loading branch information
github-actions[bot] and sollhui authored Dec 5, 2024
1 parent baedeb2 commit fffe19a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions be/src/runtime/routine_load/routine_load_task_executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ class RoutineLoadTaskExecutor {
std::vector<PIntegerPair>* partition_offsets,
int timeout);

ThreadPool& get_thread_pool() { return *_thread_pool; }

private:
// execute the task
void exec_task(std::shared_ptr<StreamLoadContext> ctx, DataConsumerPool* pool,
Expand Down
5 changes: 4 additions & 1 deletion be/src/service/internal_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,10 @@ void PInternalService::report_stream_load_status(google::protobuf::RpcController
void PInternalService::get_info(google::protobuf::RpcController* controller,
const PProxyRequest* request, PProxyResult* response,
google::protobuf::Closure* done) {
bool ret = _heavy_work_pool.try_offer([this, request, response, done]() {
bool ret = _exec_env->routine_load_task_executor()->get_thread_pool().submit_func([this,
request,
response,
done]() {
brpc::ClosureGuard closure_guard(done);
// PProxyRequest is defined in gensrc/proto/internal_service.proto
// Currently it supports 2 kinds of requests:
Expand Down

0 comments on commit fffe19a

Please sign in to comment.