From f6aed44076dbcf146686b7d9079f8da86b1d5db4 Mon Sep 17 00:00:00 2001 From: Minghao Li Date: Wed, 8 Jun 2022 13:52:33 +0800 Subject: [PATCH] refactor(sync): syncNodeSendMsgById to one line --- source/libs/sync/src/syncMain.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/libs/sync/src/syncMain.c b/source/libs/sync/src/syncMain.c index 8db4d6bd11..ad76b0d6a8 100644 --- a/source/libs/sync/src/syncMain.c +++ b/source/libs/sync/src/syncMain.c @@ -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); -- GitLab