Merge branch '3.0' of https://github.com/taosdata/TDengine into feat/TD-21898
This commit is contained in:
commit
6e9866b1ab
|
@ -144,11 +144,7 @@ void vmCloseVnode(SVnodeMgmt *pMgmt, SVnodeObj *pVnode, bool commitAndRemoveWal)
|
||||||
char path[TSDB_FILENAME_LEN] = {0};
|
char path[TSDB_FILENAME_LEN] = {0};
|
||||||
bool atExit = true;
|
bool atExit = true;
|
||||||
|
|
||||||
if (pVnode->failed) {
|
if (pVnode->pImpl && vnodeIsLeader(pVnode->pImpl)) {
|
||||||
ASSERT(pVnode->pImpl == NULL);
|
|
||||||
goto _closed;
|
|
||||||
}
|
|
||||||
if (vnodeIsLeader(pVnode->pImpl)) {
|
|
||||||
vnodeProposeCommitOnNeed(pVnode->pImpl, atExit);
|
vnodeProposeCommitOnNeed(pVnode->pImpl, atExit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,6 +153,10 @@ void vmCloseVnode(SVnodeMgmt *pMgmt, SVnodeObj *pVnode, bool commitAndRemoveWal)
|
||||||
taosThreadRwlockUnlock(&pMgmt->lock);
|
taosThreadRwlockUnlock(&pMgmt->lock);
|
||||||
vmReleaseVnode(pMgmt, pVnode);
|
vmReleaseVnode(pMgmt, pVnode);
|
||||||
|
|
||||||
|
if (pVnode->failed) {
|
||||||
|
ASSERT(pVnode->pImpl == NULL);
|
||||||
|
goto _closed;
|
||||||
|
}
|
||||||
dInfo("vgId:%d, pre close", pVnode->vgId);
|
dInfo("vgId:%d, pre close", pVnode->vgId);
|
||||||
vnodePreClose(pVnode->pImpl);
|
vnodePreClose(pVnode->pImpl);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue