提交 dd87e8f7 编写于 作者: S Shengliang Guan

refactor: node mgmt

上级 447c9504
...@@ -195,8 +195,6 @@ static int32_t dmRunDnode() { ...@@ -195,8 +195,6 @@ static int32_t dmRunDnode() {
int32_t code = dmRun(pDnode); int32_t code = dmRun(pDnode);
dInfo("start shutting down the service"); dInfo("start shutting down the service");
global.pDnode = NULL;
dmClose(pDnode);
dmCleanup(); dmCleanup();
taosCloseLog(); taosCloseLog();
taosCleanupCfg(); taosCleanupCfg();
......
...@@ -203,7 +203,10 @@ void dmCloseNode(SMgmtWrapper *pWrapper) { ...@@ -203,7 +203,10 @@ void dmCloseNode(SMgmtWrapper *pWrapper) {
} }
taosWLockLatch(&pWrapper->latch); taosWLockLatch(&pWrapper->latch);
if (pWrapper->pMgmt != NULL) {
(*pWrapper->func.closeFp)(pWrapper->pMgmt); (*pWrapper->func.closeFp)(pWrapper->pMgmt);
pWrapper->pMgmt = NULL;
}
taosWUnLockLatch(&pWrapper->latch); taosWUnLockLatch(&pWrapper->latch);
if (pWrapper->procObj) { if (pWrapper->procObj) {
...@@ -334,6 +337,7 @@ int32_t dmRun(SDnode *pDnode) { ...@@ -334,6 +337,7 @@ int32_t dmRun(SDnode *pDnode) {
dmSetStatus(pDnode, DND_STAT_STOPPED); dmSetStatus(pDnode, DND_STAT_STOPPED);
dmStopNodes(pDnode); dmStopNodes(pDnode);
dmCloseNodes(pDnode); dmCloseNodes(pDnode);
dmClose(pDnode);
return 0; return 0;
} else { } else {
dmWatchNodes(pDnode); dmWatchNodes(pDnode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册