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; SEpSet epSet;
syncUtilraftId2EpSet(destRaftId, &epSet); syncUtilraftId2EpSet(destRaftId, &epSet);
if (pSyncNode->FpSendMsg != NULL) { if (pSyncNode->FpSendMsg != NULL) {
char logBuf[128] = {0}; char* JsonStr = syncRpcMsg2Str(pMsg);
snprintf(logBuf, sizeof(logBuf), "==syncNodeSendMsgById== msgType:%d", pMsg->msgType); syncUtilJson2Line(JsonStr);
syncRpcMsgLog2(logBuf, pMsg); sTrace("sync send msg, vgId:%d, type:%d, msg:%s", pSyncNode->vgId, pMsg->msgType, JsonStr);
taosMemoryFree(JsonStr);
// htonl // htonl
syncUtilMsgHtoN(pMsg->pCont); syncUtilMsgHtoN(pMsg->pCont);