You need to sign in or sign up before continuing.
提交 1190e78c 编写于 作者: O obdev 提交者: wangzelin.wzl

fix dfc server thread core when stop

上级 e8452fc9
...@@ -606,6 +606,11 @@ int ObServer::stop() ...@@ -606,6 +606,11 @@ int ObServer::stop()
} }
LOG_WARN("distributed scheduler manager has stopped"); 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"); LOG_INFO("begin stop GDS");
GDS.stop(); GDS.stop();
LOG_WARN("GDS stopped"); LOG_WARN("GDS stopped");
......
...@@ -288,6 +288,11 @@ int ObDtl::init() ...@@ -288,6 +288,11 @@ int ObDtl::init()
return ret; return ret;
} }
void ObDtl::stop()
{
dfc_server_.stop();
}
int ObDtl::create_channel( int ObDtl::create_channel(
uint64_t tenant_id, uint64_t chid, const ObAddr& peer, ObDtlChannel*& chan, ObDtlFlowControl* dfc) uint64_t tenant_id, uint64_t chid, const ObAddr& peer, ObDtlChannel*& chan, ObDtlFlowControl* dfc)
{ {
......
...@@ -95,6 +95,7 @@ public: ...@@ -95,6 +95,7 @@ public:
// Initialize DTL service. // Initialize DTL service.
int init(); int init();
void stop();
ObDtlRpcProxy& get_rpc_proxy(); ObDtlRpcProxy& get_rpc_proxy();
const ObDtlRpcProxy& get_rpc_proxy() const; const ObDtlRpcProxy& get_rpc_proxy() const;
......
...@@ -399,8 +399,17 @@ int ObDfcServer::init() ...@@ -399,8 +399,17 @@ int ObDfcServer::init()
return ret; return ret;
} }
void ObDfcServer::stop()
{
TG_STOP(lib::TGDefIDs::DtlDfc);
LOG_INFO("DtlDfc timer stopped");
}
void ObDfcServer::destroy() void ObDfcServer::destroy()
{} {
TG_DESTROY(lib::TGDefIDs::DtlDfc);
LOG_INFO("DtlDfc timer destroy");
}
void ObDfcServer::runTimerTask() void ObDfcServer::runTimerTask()
{ {
......
...@@ -170,6 +170,7 @@ public: ...@@ -170,6 +170,7 @@ public:
} }
int init(); int init();
void stop();
void destroy(); void destroy();
// check tenant dfc resource every 10 seconds // check tenant dfc resource every 10 seconds
void runTimerTask(); void runTimerTask();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册