未验证 提交 562c8c99 编写于 作者: X Xiaoyu Wang 提交者: GitHub

Merge pull request #18531 from taosdata/refact/submit_req_wxy

enh: insert row format
......@@ -3203,6 +3203,7 @@ int32_t tSerializeSMqHbReq(void* buf, int32_t bufLen, SMqHbReq* pReq);
int32_t tDeserializeSMqHbReq(void* buf, int32_t bufLen, SMqHbReq* pReq);
typedef struct {
bool isColFmt;
int64_t suid;
int64_t uid;
int32_t sver;
......
......@@ -6834,18 +6834,26 @@ _exit:
return code;
}
void destroySSubmitTbData(SSubmitTbData *pTbData) {
if (pTbData->isColFmt) {
// todo
} else {
taosArrayDestroyP(pTbData->aRowP, (FDelete)tRowDestroy);
}
}
void tDestroySSubmitTbData(SSubmitTbData *pTbData) {
// todo
if (NULL == pTbData) {
return;
}
destroySSubmitTbData(pTbData);
taosMemoryFree(pTbData);
}
void tDestroySSubmitReq2(SSubmitReq2 *pReq) {
if (NULL == pReq) return;
if (pReq->flag & SUBMIT_REQ_AUTO_CREATE_TABLE) {
taosArrayDestroyEx(pReq->aCreateTbReq, NULL /* todo */);
}
taosArrayDestroyEx(pReq->aSubmitTbData, NULL /* todo */);
taosArrayDestroyEx(pReq->aCreateTbReq, (FDelete)tdDestroySVCreateTbReq);
taosArrayDestroyEx(pReq->aSubmitTbData, (FDelete)destroySSubmitTbData);
taosMemoryFree(pReq);
}
......@@ -1071,6 +1071,7 @@ void insDestroyTableDataCxt(STableDataCxt* pTableCxt) {
tdDestroySVCreateTbReq(pTableCxt->pCreateTblReq);
taosMemoryFreeClear(pTableCxt->pCreateTblReq);
tDestroySSubmitTbData(pTableCxt->pData);
taosMemoryFree(pTableCxt);
}
void insDestroyVgroupDataCxt(SVgroupDataCxt* pVgCxt) {
......@@ -1079,6 +1080,7 @@ void insDestroyVgroupDataCxt(SVgroupDataCxt* pVgCxt) {
}
tDestroySSubmitReq2(pVgCxt->pData);
taosMemoryFree(pVgCxt);
}
void insDestroyVgroupDataCxtList(SArray* pVgCxtList) {
......@@ -1134,6 +1136,7 @@ static int32_t fillVgroupDataCxt(STableDataCxt* pTableCxt, SVgroupDataCxt* pVgCx
}
}
taosArrayPush(pVgCxt->pData->aCreateTbReq, pTableCxt->pCreateTblReq);
taosMemoryFreeClear(pTableCxt->pCreateTblReq);
}
if (NULL == pVgCxt->pData->aSubmitTbData) {
......@@ -1143,7 +1146,7 @@ static int32_t fillVgroupDataCxt(STableDataCxt* pTableCxt, SVgroupDataCxt* pVgCx
}
}
taosArrayPush(pVgCxt->pData->aSubmitTbData, pTableCxt->pData);
pTableCxt->pData = NULL;
taosMemoryFreeClear(pTableCxt->pData);
return TSDB_CODE_SUCCESS;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册