fix:[TD-31017]process return value in mnode for tmq

This commit is contained in:
wangmm0220 2024-07-22 17:43:26 +08:00
parent 862a40afa0
commit 7b39915027
3 changed files with 11 additions and 5 deletions

View File

@ -604,7 +604,9 @@ SSdbRaw *mndConsumerActionEncode(SMqConsumerObj *pConsumer) {
if (buf == NULL) goto CM_ENCODE_OVER;
void *abuf = buf;
tEncodeSMqConsumerObj(&abuf, pConsumer);
if(tEncodeSMqConsumerObj(&abuf, pConsumer) < 0){
goto CM_ENCODE_OVER;
}
int32_t dataPos = 0;
SDB_SET_INT32(pRaw, dataPos, tlen, CM_ENCODE_OVER);

View File

@ -1109,7 +1109,9 @@ static SSdbRaw *mndSubActionEncode(SMqSubscribeObj *pSub) {
if (buf == NULL) goto SUB_ENCODE_OVER;
void *abuf = buf;
tEncodeSubscribeObj(&abuf, pSub);
if (tEncodeSubscribeObj(&abuf, pSub) < 0){
goto SUB_ENCODE_OVER;
}
int32_t dataPos = 0;
SDB_SET_INT32(pRaw, dataPos, tlen, SUB_ENCODE_OVER);
@ -1342,7 +1344,7 @@ static int32_t buildResult(SSDataBlock *pBlock, int32_t *numOfRows, int64_t cons
// consumer id
char consumerIdHex[32] = {0};
sprintf(varDataVal(consumerIdHex), "0x%" PRIx64, consumerId);
(void)sprintf(varDataVal(consumerIdHex), "0x%" PRIx64, consumerId);
varDataSetLen(consumerIdHex, strlen(varDataVal(consumerIdHex)));
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);

View File

@ -134,7 +134,9 @@ SSdbRaw *mndTopicActionEncode(SMqTopicObj *pTopic) {
goto TOPIC_ENCODE_OVER;
}
void *aswBuf = swBuf;
taosEncodeSSchemaWrapper(&aswBuf, &pTopic->schema);
if(taosEncodeSSchemaWrapper(&aswBuf, &pTopic->schema) < 0){
goto TOPIC_ENCODE_OVER;
}
SDB_SET_BINARY(pRaw, dataPos, swBuf, schemaLen, TOPIC_ENCODE_OVER);
}
@ -264,7 +266,7 @@ SSdbRow *mndTopicActionDecode(SSdbRaw *pRaw) {
}
int16_t colId;
SDB_GET_INT16(pRaw, dataPos, &colId, TOPIC_DECODE_OVER);
taosArrayPush(pTopic->ntbColIds, &colId);
(void)taosArrayPush(pTopic->ntbColIds, &colId);
}
SDB_GET_INT64(pRaw, dataPos, &pTopic->ctbStbUid, TOPIC_DECODE_OVER);