fix(vnode/mgmt): pre close vnode after queue's empty
This commit is contained in:
parent
8a773d6b7f
commit
c28ba32c93
|
@ -84,9 +84,6 @@ void vmCloseVnode(SVnodeMgmt *pMgmt, SVnodeObj *pVnode) {
|
||||||
taosThreadRwlockUnlock(&pMgmt->lock);
|
taosThreadRwlockUnlock(&pMgmt->lock);
|
||||||
vmReleaseVnode(pMgmt, pVnode);
|
vmReleaseVnode(pMgmt, pVnode);
|
||||||
|
|
||||||
dInfo("vgId:%d, pre close", pVnode->vgId);
|
|
||||||
vnodePreClose(pVnode->pImpl);
|
|
||||||
|
|
||||||
dInfo("vgId:%d, wait for vnode ref become 0", pVnode->vgId);
|
dInfo("vgId:%d, wait for vnode ref become 0", pVnode->vgId);
|
||||||
while (pVnode->refCount > 0) taosMsleep(10);
|
while (pVnode->refCount > 0) taosMsleep(10);
|
||||||
|
|
||||||
|
@ -118,6 +115,9 @@ void vmCloseVnode(SVnodeMgmt *pMgmt, SVnodeObj *pVnode) {
|
||||||
|
|
||||||
dInfo("vgId:%d, all vnode queues is empty", pVnode->vgId);
|
dInfo("vgId:%d, all vnode queues is empty", pVnode->vgId);
|
||||||
|
|
||||||
|
dInfo("vgId:%d, pre close", pVnode->vgId);
|
||||||
|
vnodePreClose(pVnode->pImpl);
|
||||||
|
|
||||||
vmFreeQueue(pMgmt, pVnode);
|
vmFreeQueue(pMgmt, pVnode);
|
||||||
vnodeClose(pVnode->pImpl);
|
vnodeClose(pVnode->pImpl);
|
||||||
pVnode->pImpl = NULL;
|
pVnode->pImpl = NULL;
|
||||||
|
|
|
@ -1050,7 +1050,7 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
||||||
status = "offline";
|
status = "offline";
|
||||||
}
|
}
|
||||||
|
|
||||||
char b1[9] = {0};
|
char b1[16] = {0};
|
||||||
STR_TO_VARSTR(b1, status);
|
STR_TO_VARSTR(b1, status);
|
||||||
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);
|
||||||
colDataAppend(pColInfo, numOfRows, b1, false);
|
colDataAppend(pColInfo, numOfRows, b1, false);
|
||||||
|
|
Loading…
Reference in New Issue