Merge pull request #20054 from taosdata/enh/3.0_planner_optimize

fix: wal compatibility of normal tables
This commit is contained in:
Xiaoyu Wang 2023-02-20 16:40:45 +08:00 committed by GitHub
commit 9aa8b07a74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -1002,7 +1002,8 @@ typedef struct SSubmitReqConvertCxt {
static int32_t vnodeResetTableCxt(SMeta *pMeta, SSubmitReqConvertCxt *pCxt) {
taosMemoryFreeClear(pCxt->pTbSchema);
pCxt->pTbSchema = metaGetTbTSchema(pMeta, pCxt->msgIter.suid, pCxt->msgIter.sversion, 1);
pCxt->pTbSchema = metaGetTbTSchema(pMeta, pCxt->msgIter.suid > 0 ? pCxt->msgIter.suid : pCxt->msgIter.uid,
pCxt->msgIter.sversion, 1);
if (NULL == pCxt->pTbSchema) {
return TSDB_CODE_INVALID_MSG;
}
@ -1181,12 +1182,16 @@ static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq
pRsp->code = TSDB_CODE_SUCCESS;
void *pAllocMsg = NULL;
SSubmitReq2Msg *pMsg = (SSubmitReq2Msg *)pReq;
if (0 == pMsg->version) {
code = vnodeSubmitReqConvertToSubmitReq2(pVnode, (SSubmitReq *)pMsg, pSubmitReq);
if (TSDB_CODE_SUCCESS == code) {
code = vnodeRebuildSubmitReqMsg(pSubmitReq, &pReq);
}
if (TSDB_CODE_SUCCESS == code) {
pAllocMsg = pReq;
}
if (TSDB_CODE_SUCCESS != code) {
goto _exit;
}
@ -1346,9 +1351,7 @@ _exit:
if (code) terrno = code;
if (0 == pMsg->version) {
taosMemoryFree(pReq);
}
taosMemoryFree(pAllocMsg);
return code;
}