fix invalid write
This commit is contained in:
parent
5f7ae72271
commit
fc8dcbab37
|
@ -93,7 +93,11 @@ static int32_t mndProcessGetSubEpReq(SMnodeMsg *pMsg) {
|
|||
for (int32_t j = 0; j < assignedSz; j++) {
|
||||
SMqConsumerEp *pCEp = taosArrayGet(pSub->assigned, i);
|
||||
if (pCEp->consumerId == consumerId) {
|
||||
taosArrayPush(pSub->assigned, pCEp);
|
||||
SMqSubVgEp vgEp = {
|
||||
.epSet = pCEp->epSet,
|
||||
.vgId = pCEp->vgId
|
||||
};
|
||||
taosArrayPush(topicEp.vgs, &vgEp);
|
||||
}
|
||||
}
|
||||
if (taosArrayGetSize(topicEp.vgs) != 0) {
|
||||
|
|
|
@ -237,7 +237,7 @@ static int32_t mndCreateTopic(SMnode *pMnode, SMnodeMsg *pMsg, SCMCreateTopicReq
|
|||
tstrncpy(topicObj.db, pDb->name, TSDB_DB_FNAME_LEN);
|
||||
topicObj.createTime = taosGetTimestampMs();
|
||||
topicObj.updateTime = topicObj.createTime;
|
||||
topicObj.uid = mndGenerateUid(pCreate->name, TSDB_TOPIC_FNAME_LEN);
|
||||
topicObj.uid = mndGenerateUid(pCreate->name, strlen(pCreate->name));
|
||||
topicObj.dbUid = pDb->uid;
|
||||
topicObj.version = 1;
|
||||
topicObj.sql = strdup(pCreate->sql);
|
||||
|
|
Loading…
Reference in New Issue