enh: check trans conflict in mndCreateTopic ahead of time

This commit is contained in:
Benguang Zhao 2023-06-26 16:38:40 +08:00
parent 9e2062f54a
commit 69d451db26
1 changed files with 3 additions and 1 deletions

View File

@ -476,7 +476,9 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq *
}
mndTransSetDbName(pTrans, pDb->name, NULL);
if (mndTransCheckConflict(pMnode, pTrans) != 0) {
goto _OUT;
}
mInfo("trans:%d to create topic:%s", pTrans->id, pCreate->name);
SSdbRaw *pCommitRaw = mndTopicActionEncode(&topicObj);