refactor(sync): syncNodeSendMsgById to one line

This commit is contained in:
Minghao Li 2022-06-08 13:52:33 +08:00
parent 77cd6f44f4
commit f6aed44076
1 changed files with 4 additions and 3 deletions

View File

@ -835,9 +835,10 @@ int32_t syncNodeSendMsgById(const SRaftId* destRaftId, SSyncNode* pSyncNode, SRp
SEpSet epSet;
syncUtilraftId2EpSet(destRaftId, &epSet);
if (pSyncNode->FpSendMsg != NULL) {
char logBuf[128] = {0};
snprintf(logBuf, sizeof(logBuf), "==syncNodeSendMsgById== msgType:%d", pMsg->msgType);
syncRpcMsgLog2(logBuf, pMsg);
char* JsonStr = syncRpcMsg2Str(pMsg);
syncUtilJson2Line(JsonStr);
sTrace("sync send msg, vgId:%d, type:%d, msg:%s", pSyncNode->vgId, pMsg->msgType, JsonStr);
taosMemoryFree(JsonStr);
// htonl
syncUtilMsgHtoN(pMsg->pCont);