From 7e207e16e318de60de44d596eafe18048b55b778 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 12 May 2022 17:36:04 +0800 Subject: [PATCH] refactor: node mgmt --- source/dnode/mgmt/exe/dmMain.c | 2 ++ source/dnode/mgmt/node_mgmt/src/dmExec.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/source/dnode/mgmt/exe/dmMain.c b/source/dnode/mgmt/exe/dmMain.c index ea6845b04f..21776d71f6 100644 --- a/source/dnode/mgmt/exe/dmMain.c +++ b/source/dnode/mgmt/exe/dmMain.c @@ -195,6 +195,8 @@ static int32_t dmRunDnode() { int32_t code = dmRun(pDnode); dInfo("start shutting down the service"); + global.pDnode = NULL; + dmClose(pDnode); dmCleanup(); taosCloseLog(); taosCleanupCfg(); diff --git a/source/dnode/mgmt/node_mgmt/src/dmExec.c b/source/dnode/mgmt/node_mgmt/src/dmExec.c index b1c7158cd9..7fb89de59e 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmExec.c +++ b/source/dnode/mgmt/node_mgmt/src/dmExec.c @@ -337,7 +337,6 @@ int32_t dmRun(SDnode *pDnode) { dmSetStatus(pDnode, DND_STAT_STOPPED); dmStopNodes(pDnode); dmCloseNodes(pDnode); - dmClose(pDnode); return 0; } else { dmWatchNodes(pDnode); -- GitLab