diff --git a/src/vnode/src/vnodeMain.c b/src/vnode/src/vnodeMain.c index eb43fba0798085d84c793a145b082325e6d56a15..5f6f3fe105a9f0e4933db830dc42a6b597ea2ee1 100644 --- a/src/vnode/src/vnodeMain.c +++ b/src/vnode/src/vnodeMain.c @@ -420,9 +420,6 @@ void vnodeCleanUp(SVnodeObj *pVnode) { vnodeSetClosingStatus(pVnode); - // release local resources only after cutting off outside connections - qQueryMgmtNotifyClosed(pVnode->qMgmt); - // stop replication module if (pVnode->sync > 0) { int64_t sync = pVnode->sync; diff --git a/src/vnode/src/vnodeStatus.c b/src/vnode/src/vnodeStatus.c index ce7ddd11b529c7da22519af3c657e4e898aea2ea..c016b78396772f917e5eded4e73d375c345a1d55 100644 --- a/src/vnode/src/vnodeStatus.c +++ b/src/vnode/src/vnodeStatus.c @@ -75,6 +75,9 @@ bool vnodeSetClosingStatus(SVnodeObj* pVnode) { } } + // release local resources only after cutting off outside connections + qQueryMgmtNotifyClosed(pVnode->qMgmt); + return true; } @@ -116,6 +119,9 @@ bool vnodeSetResetStatus(SVnodeObj* pVnode) { } } + // release local resources only after cutting off outside connections + qQueryMgmtNotifyClosed(pVnode->qMgmt); + return true; }