fix: return errorcode if sync stop

This commit is contained in:
Shengliang Guan 2022-12-13 11:28:48 +08:00
parent 9da398913e
commit e764666005
1 changed files with 2 additions and 1 deletions

View File

@ -341,7 +341,7 @@ void mndSyncCheckTimeout(SMnode *pMnode) {
curSec - pMgmt->transSec); curSec - pMgmt->transSec);
} }
} else { } else {
mTrace("check sync timeout msg, no trans waiting for confirm"); // mTrace("check sync timeout msg, no trans waiting for confirm");
} }
taosThreadMutexUnlock(&pMgmt->lock); taosThreadMutexUnlock(&pMgmt->lock);
} }
@ -422,6 +422,7 @@ void mndSyncStop(SMnode *pMnode) {
mInfo("vgId:1, is stopped and post sem, trans:%d", pMgmt->transId); mInfo("vgId:1, is stopped and post sem, trans:%d", pMgmt->transId);
pMgmt->transId = 0; pMgmt->transId = 0;
pMgmt->transSec = 0; pMgmt->transSec = 0;
pMgmt->errCode = TSDB_CODE_APP_IS_STOPPING;
tsem_post(&pMgmt->syncSem); tsem_post(&pMgmt->syncSem);
} }
taosThreadMutexUnlock(&pMgmt->lock); taosThreadMutexUnlock(&pMgmt->lock);