fix:[TS-5776]error in ci

This commit is contained in:
wangmm0220 2025-02-18 11:20:42 +08:00
parent 551eb5bf41
commit 9dcac195cb
2 changed files with 11 additions and 9 deletions

View File

@ -2608,7 +2608,7 @@ void tmq_free_raw(tmq_raw_data raw) {
raw.raw_type == RES_TYPE__TMQ_METADATA) { raw.raw_type == RES_TYPE__TMQ_METADATA) {
taosMemoryFree(raw.raw); taosMemoryFree(raw.raw);
} else if(raw.raw_type == RES_TYPE__TMQ_RAWDATA && raw.raw != NULL){ } else if(raw.raw_type == RES_TYPE__TMQ_RAWDATA && raw.raw != NULL){
taosMemoryFree(raw.raw - sizeof(SMqRspHead)); taosMemoryFree(POINTER_SHIFT(raw.raw, - sizeof(SMqRspHead)));
} }
(void)memset(terrMsg, 0, ERR_MSG_LEN); (void)memset(terrMsg, 0, ERR_MSG_LEN);
} }

View File

@ -31,8 +31,9 @@ static int32_t tqAddRawDataToRsp(const void* rawData, SMqDataRsp* pRsp, int8_t p
memcpy(pRetrieve->data, rawData, *(uint32_t *)rawData + INT_BYTES); memcpy(pRetrieve->data, rawData, *(uint32_t *)rawData + INT_BYTES);
TSDB_CHECK_NULL(taosArrayPush(pRsp->blockDataLen, &dataStrLen), code, lino, END, terrno); TSDB_CHECK_NULL(taosArrayPush(pRsp->blockDataLen, &dataStrLen), code, lino, END, terrno);
TSDB_CHECK_NULL(taosArrayPush(pRsp->blockData, &buf), code, lino, END, terrno); TSDB_CHECK_NULL(taosArrayPush(pRsp->blockData, &buf), code, lino, END, terrno);
pRsp->blockDataElementFree = true;
tqTrace("add block data to block array, blockDataLen:%d, blockData:%p", dataStrLen, buf); tqTrace("tqAddRawDataToRsp add block data to block array, blockDataLen:%d, blockData:%p", dataStrLen, buf);
END: END:
if (code != TSDB_CODE_SUCCESS) { if (code != TSDB_CODE_SUCCESS) {
taosMemoryFree(buf); taosMemoryFree(buf);
@ -63,12 +64,13 @@ static int32_t tqAddBlockDataToRsp(const SSDataBlock* pBlock, SMqDataRsp* pRsp,
TSDB_CHECK_NULL(taosArrayPush(pRsp->blockDataLen, &actualLen), code, lino, END, terrno); TSDB_CHECK_NULL(taosArrayPush(pRsp->blockDataLen, &actualLen), code, lino, END, terrno);
TSDB_CHECK_NULL(taosArrayPush(pRsp->blockData, &buf), code, lino, END, terrno); TSDB_CHECK_NULL(taosArrayPush(pRsp->blockData, &buf), code, lino, END, terrno);
pRsp->blockDataElementFree = true; pRsp->blockDataElementFree = true;
buf = NULL; tqTrace("tqAddBlockDataToRsp add block data to block array, blockDataLen:%d, blockData:%p", dataStrLen, buf);
END: END:
if (code != 0){ if (code != TSDB_CODE_SUCCESS){
taosMemoryFree(buf);
tqError("%s failed at line %d with msg:%s", __func__, lino, tstrerror(code)); tqError("%s failed at line %d with msg:%s", __func__, lino, tstrerror(code));
} }
taosMemoryFree(buf);
return code; return code;
} }
@ -400,10 +402,6 @@ static void preProcessSubmitMsg(STqHandle* pHandle, const SMqPollReq* pRequest,
return; return;
} }
if (pSubmitTbData->pCreateTbReq == NULL){
continue;
}
int64_t uid = pSubmitTbData->uid; int64_t uid = pSubmitTbData->uid;
if (taosHashGet(pRequest->uidHash, &uid, LONG_BYTES) != NULL) { if (taosHashGet(pRequest->uidHash, &uid, LONG_BYTES) != NULL) {
tqDebug("poll rawdata split,uid:%" PRId64 " is already exists", uid); tqDebug("poll rawdata split,uid:%" PRId64 " is already exists", uid);
@ -416,6 +414,10 @@ static void preProcessSubmitMsg(STqHandle* pHandle, const SMqPollReq* pRequest,
} }
} }
if (pSubmitTbData->pCreateTbReq == NULL){
continue;
}
int64_t createTime = 0; int64_t createTime = 0;
int64_t *cTime = (int64_t*)taosHashGet(pHandle->tableCreateTimeHash, &uid, LONG_BYTES); int64_t *cTime = (int64_t*)taosHashGet(pHandle->tableCreateTimeHash, &uid, LONG_BYTES);
if (cTime != NULL){ if (cTime != NULL){