Merge pull request #27422 from taosdata/fix/TD-28935-add-sdbfilelock

fix/TD-28935-add-sdbfilelock
This commit is contained in:
Hongze Cheng 2024-08-23 15:52:59 +08:00 committed by GitHub
commit cf855cbff4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -189,13 +189,16 @@ int32_t mndProcessWriteMsg(SMnode *pMnode, SRpcMsg *pMsg, SFsmCbMeta *pMeta) {
goto _OUT;
}
(void)taosThreadMutexLock(&pMnode->pSdb->filelock);
code = sdbWriteWithoutFree(pMnode->pSdb, pRaw);
if (code != 0) {
mError("trans:%d, failed to write to sdb since %s", transId, terrstr());
// code = 0;
(void)taosThreadMutexUnlock(&pMnode->pSdb->filelock);
pMeta->code = code;
goto _OUT;
}
(void)taosThreadMutexUnlock(&pMnode->pSdb->filelock);
pTrans = mndAcquireTrans(pMnode, transId);
if (pTrans == NULL) {