[improve](move-memtable) reuse connection in load_stream_stub (#39231) (#39762)

backport #39231
This commit is contained in:
Kaijie Chen
2024-08-23 22:46:28 +08:00
committed by GitHub
parent 5b124a03ba
commit 37443aa7e1
7 changed files with 48 additions and 16 deletions

View File

@ -233,7 +233,10 @@ Status ExecEnv::_init(const std::vector<StorePath>& store_paths,
_load_stream_mgr = std::make_unique<LoadStreamMgr>(num_flush_threads);
_new_load_stream_mgr = NewLoadStreamMgr::create_shared();
_internal_client_cache = new BrpcClientCache<PBackendService_Stub>();
_function_client_cache = new BrpcClientCache<PFunctionService_Stub>();
_streaming_client_cache =
new BrpcClientCache<PBackendService_Stub>("baidu_std", "single", "streaming");
_function_client_cache =
new BrpcClientCache<PFunctionService_Stub>(config::function_service_protocol);
_stream_load_executor = StreamLoadExecutor::create_shared(this);
_routine_load_task_executor = new RoutineLoadTaskExecutor(this);
RETURN_IF_ERROR(_routine_load_task_executor->init());
@ -631,6 +634,7 @@ void ExecEnv::destroy() {
SAFE_DELETE(_routine_load_task_executor);
// _stream_load_executor
SAFE_DELETE(_function_client_cache);
SAFE_DELETE(_streaming_client_cache);
SAFE_DELETE(_internal_client_cache);
SAFE_DELETE(_bfd_parser);