fix(vnode): new vnodePostClose for closing sync module
This commit is contained in:
parent
c28ba32c93
commit
0dd9e4bdee
|
@ -84,6 +84,9 @@ 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);
|
||||||
|
|
||||||
|
@ -115,8 +118,8 @@ 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);
|
dInfo("vgId:%d, post close", pVnode->vgId);
|
||||||
vnodePreClose(pVnode->pImpl);
|
vnodePostClose(pVnode->pImpl);
|
||||||
|
|
||||||
vmFreeQueue(pMgmt, pVnode);
|
vmFreeQueue(pMgmt, pVnode);
|
||||||
vnodeClose(pVnode->pImpl);
|
vnodeClose(pVnode->pImpl);
|
||||||
|
|
|
@ -54,6 +54,7 @@ int32_t vnodeAlter(const char *path, SAlterVnodeReplicaReq *pReq, STfs *pTfs);
|
||||||
void vnodeDestroy(const char *path, STfs *pTfs);
|
void vnodeDestroy(const char *path, STfs *pTfs);
|
||||||
SVnode *vnodeOpen(const char *path, STfs *pTfs, SMsgCb msgCb);
|
SVnode *vnodeOpen(const char *path, STfs *pTfs, SMsgCb msgCb);
|
||||||
void vnodePreClose(SVnode *pVnode);
|
void vnodePreClose(SVnode *pVnode);
|
||||||
|
void vnodePostClose(SVnode *pVnode);
|
||||||
void vnodeSyncCheckTimeout(SVnode *pVnode);
|
void vnodeSyncCheckTimeout(SVnode *pVnode);
|
||||||
void vnodeClose(SVnode *pVnode);
|
void vnodeClose(SVnode *pVnode);
|
||||||
|
|
||||||
|
|
|
@ -245,10 +245,9 @@ _err:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vnodePreClose(SVnode *pVnode) {
|
void vnodePreClose(SVnode *pVnode) { vnodeQueryPreClose(pVnode); }
|
||||||
vnodeQueryPreClose(pVnode);
|
|
||||||
vnodeSyncPreClose(pVnode);
|
void vnodePostClose(SVnode *pVnode) { vnodeSyncPreClose(pVnode); }
|
||||||
}
|
|
||||||
|
|
||||||
void vnodeClose(SVnode *pVnode) {
|
void vnodeClose(SVnode *pVnode) {
|
||||||
if (pVnode) {
|
if (pVnode) {
|
||||||
|
|
Loading…
Reference in New Issue