enh: adjust sync append entry reply
This commit is contained in:
parent
54e05aee26
commit
152b1ea9a3
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue