提交 c79b63ab 编写于 作者: X Xiaoyu Wang

fix: wal compatibility of normal tables

上级 0f4de9da
...@@ -987,7 +987,8 @@ typedef struct SSubmitReqConvertCxt { ...@@ -987,7 +987,8 @@ typedef struct SSubmitReqConvertCxt {
static int32_t vnodeResetTableCxt(SMeta *pMeta, SSubmitReqConvertCxt *pCxt) { static int32_t vnodeResetTableCxt(SMeta *pMeta, SSubmitReqConvertCxt *pCxt) {
taosMemoryFreeClear(pCxt->pTbSchema); 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) { if (NULL == pCxt->pTbSchema) {
return TSDB_CODE_INVALID_MSG; return TSDB_CODE_INVALID_MSG;
} }
...@@ -1166,12 +1167,16 @@ static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq ...@@ -1166,12 +1167,16 @@ static int32_t vnodeProcessSubmitReq(SVnode *pVnode, int64_t version, void *pReq
pRsp->code = TSDB_CODE_SUCCESS; pRsp->code = TSDB_CODE_SUCCESS;
void *pAllocMsg = NULL;
SSubmitReq2Msg *pMsg = (SSubmitReq2Msg *)pReq; SSubmitReq2Msg *pMsg = (SSubmitReq2Msg *)pReq;
if (0 == pMsg->version) { if (0 == pMsg->version) {
code = vnodeSubmitReqConvertToSubmitReq2(pVnode, (SSubmitReq *)pMsg, pSubmitReq); code = vnodeSubmitReqConvertToSubmitReq2(pVnode, (SSubmitReq *)pMsg, pSubmitReq);
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
code = vnodeRebuildSubmitReqMsg(pSubmitReq, &pReq); code = vnodeRebuildSubmitReqMsg(pSubmitReq, &pReq);
} }
if (TSDB_CODE_SUCCESS == code) {
pAllocMsg = pReq;
}
if (TSDB_CODE_SUCCESS != code) { if (TSDB_CODE_SUCCESS != code) {
goto _exit; goto _exit;
} }
...@@ -1331,9 +1336,7 @@ _exit: ...@@ -1331,9 +1336,7 @@ _exit:
if (code) terrno = code; if (code) terrno = code;
if (0 == pMsg->version) { taosMemoryFree(pAllocMsg);
taosMemoryFree(pReq);
}
return code; return code;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册