diff --git a/src/observer/ob_server.cpp b/src/observer/ob_server.cpp index db894625ea6cd91fb677ab261eabbe2c16c287c9..3f0a0be71086806041d8b5357b4679ca5f984923 100644 --- a/src/observer/ob_server.cpp +++ b/src/observer/ob_server.cpp @@ -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"); diff --git a/src/sql/dtl/ob_dtl.cpp b/src/sql/dtl/ob_dtl.cpp index 29b1445a5a1619b2522df735339cba6aace94c9c..d0df0334aa0d88f5b59486d41cd0055c5a03cce6 100644 --- a/src/sql/dtl/ob_dtl.cpp +++ b/src/sql/dtl/ob_dtl.cpp @@ -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) { diff --git a/src/sql/dtl/ob_dtl.h b/src/sql/dtl/ob_dtl.h index e10002efa5f283f26854734243f9c30f0ec91970..74a5d6a1081fd4108b8504db4e84b4d8c50f9784 100644 --- a/src/sql/dtl/ob_dtl.h +++ b/src/sql/dtl/ob_dtl.h @@ -95,6 +95,7 @@ public: // Initialize DTL service. int init(); + void stop(); ObDtlRpcProxy& get_rpc_proxy(); const ObDtlRpcProxy& get_rpc_proxy() const; diff --git a/src/sql/dtl/ob_dtl_fc_server.cpp b/src/sql/dtl/ob_dtl_fc_server.cpp index db1e239c73b05435861367289875f92b0379bdeb..9b9cded2423ccb3c4cd0688675fe2d48b48c38ba 100644 --- a/src/sql/dtl/ob_dtl_fc_server.cpp +++ b/src/sql/dtl/ob_dtl_fc_server.cpp @@ -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() { diff --git a/src/sql/dtl/ob_dtl_fc_server.h b/src/sql/dtl/ob_dtl_fc_server.h index 69077454a94c5e0946effcc13e12f422de8524f8..4ea1c61e267d10dc8587c6b96b62ba98fdba378a 100644 --- a/src/sql/dtl/ob_dtl_fc_server.h +++ b/src/sql/dtl/ob_dtl_fc_server.h @@ -170,6 +170,7 @@ public: } int init(); + void stop(); void destroy(); // check tenant dfc resource every 10 seconds void runTimerTask();