fix: change conflict scope of create topic to be DB inside
This commit is contained in:
parent
9e595daafe
commit
14e2e1e574
|
@ -483,7 +483,7 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq *
|
||||||
/*topicObj.withTbName = 1;*/
|
/*topicObj.withTbName = 1;*/
|
||||||
/*topicObj.withSchema = 1;*/
|
/*topicObj.withSchema = 1;*/
|
||||||
|
|
||||||
STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_NOTHING, pReq, "create-topic");
|
STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_ROLLBACK, TRN_CONFLICT_DB_INSIDE, pReq, "create-topic");
|
||||||
if (pTrans == NULL) {
|
if (pTrans == NULL) {
|
||||||
mError("topic:%s, failed to create since %s", pCreate->name, terrstr());
|
mError("topic:%s, failed to create since %s", pCreate->name, terrstr());
|
||||||
taosMemoryFreeClear(topicObj.ast);
|
taosMemoryFreeClear(topicObj.ast);
|
||||||
|
@ -492,6 +492,8 @@ static int32_t mndCreateTopic(SMnode *pMnode, SRpcMsg *pReq, SCMCreateTopicReq *
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mndTransSetDbName(pTrans, pDb->name, NULL);
|
||||||
|
|
||||||
mInfo("trans:%d to create topic:%s", pTrans->id, pCreate->name);
|
mInfo("trans:%d to create topic:%s", pTrans->id, pCreate->name);
|
||||||
|
|
||||||
SSdbRaw *pCommitRaw = mndTopicActionEncode(&topicObj);
|
SSdbRaw *pCommitRaw = mndTopicActionEncode(&topicObj);
|
||||||
|
|
Loading…
Reference in New Issue