Merge pull request #23133 from taosdata/fix/TD-26474-3.0

fix: mutex init for trans
This commit is contained in:
dapan1121 2023-10-08 15:07:47 +08:00 committed by GitHub
commit 9b207b9b3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -543,6 +543,8 @@ STrans *mndAcquireTrans(SMnode *pMnode, int32_t transId) {
STrans *pTrans = sdbAcquire(pMnode->pSdb, SDB_TRANS, &transId);
if (pTrans == NULL) {
terrno = TSDB_CODE_MND_TRANS_NOT_EXIST;
} else {
taosThreadMutexInit(&pTrans->mutex, NULL);
}
return pTrans;
}