enh: adjust sync append entry reply

This commit is contained in:
Shengliang Guan 2022-11-12 20:28:45 +08:00
parent 54e05aee26
commit 152b1ea9a3
2 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ int32_t syncNodeOnAppendEntries(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
}
// prepare response msg
int32_t code = syncBuildRequestVoteReply(&rpcRsp, ths->vgId);
int32_t code = syncBuildAppendEntriesReply(&rpcRsp, ths->vgId);
if (code != 0) {
syncLogRecvAppendEntries(ths, pMsg, "build rsp error");
goto _IGNORE;

View File

@ -140,7 +140,7 @@ int32_t syncBuildAppendEntries(SRpcMsg* pMsg, int32_t dataLen, int32_t vgId) {
}
int32_t syncBuildAppendEntriesReply(SRpcMsg* pMsg, int32_t vgId) {
int32_t bytes = sizeof(SyncRequestVoteReply);
int32_t bytes = sizeof(SyncAppendEntriesReply);
pMsg->pCont = rpcMallocCont(bytes);
pMsg->msgType = TDMT_SYNC_APPEND_ENTRIES_REPLY;
pMsg->contLen = bytes;