refactor: node mgmt

This commit is contained in:
Shengliang Guan 2022-05-12 17:36:04 +08:00
parent 47970ff8a4
commit 7e207e16e3
2 changed files with 2 additions and 1 deletions

View File

@ -195,6 +195,8 @@ 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();

View File

@ -337,7 +337,6 @@ 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);