fix dfc server thread core when stop

This commit is contained in:
obdev 2022-07-08 11:47:14 +08:00 committed by wangzelin.wzl
parent e8452fc947
commit 1190e78ce3
5 changed files with 22 additions and 1 deletions

View File

@ -606,6 +606,11 @@ int ObServer::stop()
}
LOG_WARN("distributed scheduler manager has stopped");
if (OB_NOT_NULL(dtl::ObDtl::instance())) {
DTL.stop();
}
LOG_INFO("sqldtl stop");
LOG_INFO("begin stop GDS");
GDS.stop();
LOG_WARN("GDS stopped");

View File

@ -288,6 +288,11 @@ int ObDtl::init()
return ret;
}
void ObDtl::stop()
{
dfc_server_.stop();
}
int ObDtl::create_channel(
uint64_t tenant_id, uint64_t chid, const ObAddr& peer, ObDtlChannel*& chan, ObDtlFlowControl* dfc)
{

View File

@ -95,6 +95,7 @@ public:
// Initialize DTL service.
int init();
void stop();
ObDtlRpcProxy& get_rpc_proxy();
const ObDtlRpcProxy& get_rpc_proxy() const;

View File

@ -399,8 +399,17 @@ int ObDfcServer::init()
return ret;
}
void ObDfcServer::stop()
{
TG_STOP(lib::TGDefIDs::DtlDfc);
LOG_INFO("DtlDfc timer stopped");
}
void ObDfcServer::destroy()
{}
{
TG_DESTROY(lib::TGDefIDs::DtlDfc);
LOG_INFO("DtlDfc timer destroy");
}
void ObDfcServer::runTimerTask()
{

View File

@ -170,6 +170,7 @@ public:
}
int init();
void stop();
void destroy();
// check tenant dfc resource every 10 seconds
void runTimerTask();