fix pnio destroyed prematurely and not support rpc authentication when obcdc running.

This commit is contained in:
obdev 2024-09-18 05:31:26 +00:00 committed by ob-robot
parent cc4af50836
commit 742e4a3b52
3 changed files with 6 additions and 3 deletions

View File

@ -282,6 +282,7 @@ int ObPocRpcServer::start(int port, int net_thread_count, frame::ObReqDeliver* d
RPC_LOG(WARN, "pn_provision for RATELIMIT_PNIO_GROUP error", K(count), K(rl_net_thread_count));
} else {
has_start_ = true;
RPC_LOG(INFO, "start rpc server success", K(port), K(count));
}
}
return ret;
@ -304,6 +305,7 @@ int ObPocRpcServer::start_net_client(int net_thread_count)
} else {
has_start_ = true;
start_as_client_ = true;
RPC_LOG(INFO, "start rpc net client success", K(net_thread_count));
}
}
return ret;
@ -329,6 +331,7 @@ void ObPocRpcServer::destroy()
{
stop();
wait();
RPC_LOG(INFO, "destory successfully");
}
int ObPocRpcServer::update_tcp_keepalive_params(int64_t user_timeout) {

View File

@ -850,6 +850,8 @@ int ObLogInstance::init_components_(const uint64_t start_tstamp_ns)
// init self addr
} else if (OB_FAIL(init_self_addr_())) {
LOG_ERROR("init self addr error", KR(ret));
} else if (OB_FAIL(global_poc_server.start_net_client(TCONF.io_thread_num))) {
LOG_ERROR("start net client failed", KR(ret));
}
}
@ -1405,6 +1407,7 @@ void ObLogInstance::destroy_components_()
if (is_data_dict_refresh_mode(refresh_mode_)) {
ObLogMetaDataService::get_instance().destroy();
}
global_poc_server.destroy();
LOG_INFO("destroy all components end");
}

View File

@ -179,8 +179,6 @@ int ObLogRpc::init(const int64_t io_thread_num)
LOG_ERROR("invalid argument", KR(ret), K(io_thread_num));
} else if (OB_FAIL(init_client_id_())) {
LOG_ERROR("init client identity failed", KR(ret));
} else if (OB_FAIL(global_poc_server.start_net_client(opt.rpc_io_cnt_))) {
LOG_ERROR("start net client failed", KR(ret), K(io_thread_num));
} else if (OB_FAIL(net_client_.init(opt))) {
LOG_ERROR("init net client fail", KR(ret), K(io_thread_num));
} else if (OB_FAIL(reload_rpc_client_auth_method())) {
@ -198,7 +196,6 @@ int ObLogRpc::init(const int64_t io_thread_num)
void ObLogRpc::destroy()
{
is_inited_ = false;
global_poc_server.destroy();
net_client_.destroy();
last_ssl_info_hash_ = UINT64_MAX;
ssl_key_expired_time_ = 0;