You need to sign in or sign up before continuing.
提交 646cb378 编写于 作者: S Shengliang Guan

fix: deadlock of vnode if its state changed

上级 353109cd
......@@ -85,7 +85,7 @@ SVnode *vnodeOpen(const char *path, STfs *pTfs, SMsgCb msgCb) {
pVnode->state.commitTerm = info.state.commitTerm;
pVnode->pTfs = pTfs;
pVnode->msgCb = msgCb;
taosInitRWLatch(&pVnode->lock);
taosThreadMutexInit(&pVnode->lock, NULL);
pVnode->blocked = false;
tsem_init(&pVnode->syncSem, 0, 0);
......@@ -200,6 +200,7 @@ void vnodeClose(SVnode *pVnode) {
tsem_destroy(&pVnode->syncSem);
taosThreadCondDestroy(&pVnode->poolNotEmpty);
taosThreadMutexDestroy(&pVnode->mutex);
taosThreadMutexDestroy(&pVnode->lock);
taosMemoryFree(pVnode);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册