fix: vnode vsubtables meta fetch issue

This commit is contained in:
dapan1121 2025-03-20 09:52:03 +08:00
parent c82398e175
commit f0f517db71
1 changed files with 10 additions and 2 deletions

View File

@ -544,6 +544,12 @@ int32_t vnodeGetBatchMeta(SVnode *pVnode, SRpcMsg *pMsg) {
qWarn("vnodeGetBatchMeta failed, msgType:%d", req->msgType); qWarn("vnodeGetBatchMeta failed, msgType:%d", req->msgType);
} }
break; break;
case TDMT_VND_VSUBTABLES_META:
// error code has been set into reqMsg, no need to handle it here.
if (TSDB_CODE_SUCCESS != vnodeGetVSubtablesMeta(pVnode, &reqMsg)) {
qWarn("vnodeGetVSubtablesMeta failed, msgType:%d", req->msgType);
}
break;
default: default:
qError("invalid req msgType %d", req->msgType); qError("invalid req msgType %d", req->msgType);
reqMsg.code = TSDB_CODE_INVALID_MSG; reqMsg.code = TSDB_CODE_INVALID_MSG;
@ -730,7 +736,7 @@ int32_t vnodeGetVSubtablesMeta(SVnode *pVnode, SRpcMsg *pMsg) {
qError("tSerializeSVSubTablesRsp failed, error:%d", rspSize); qError("tSerializeSVSubTablesRsp failed, error:%d", rspSize);
goto _return; goto _return;
} }
pRsp = rpcMallocCont(rspSize); pRsp = taosMemoryCalloc(1, rspSize);
if (pRsp == NULL) { if (pRsp == NULL) {
code = terrno; code = terrno;
qError("rpcMallocCont %d failed, error:%d", rspSize, terrno); qError("rpcMallocCont %d failed, error:%d", rspSize, terrno);
@ -755,9 +761,11 @@ _return:
qError("vnd get virtual subtables failed cause of %s", tstrerror(code)); qError("vnd get virtual subtables failed cause of %s", tstrerror(code));
} }
*pMsg = rspMsg;
tDestroySVSubTablesRsp(&rsp); tDestroySVSubTablesRsp(&rsp);
tmsgSendRsp(&rspMsg); //tmsgSendRsp(&rspMsg);
return code; return code;
} }