提交 475919dd 编写于 作者: M Minghao Li

refactor(sync): add rtt trace log

上级 7d63efd2
...@@ -83,10 +83,14 @@ int32_t syncNodeOnAppendEntriesReply(SSyncNode* ths, const SRpcMsg* pRpcMsg) { ...@@ -83,10 +83,14 @@ int32_t syncNodeOnAppendEntriesReply(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
ASSERT(pState != NULL); ASSERT(pState != NULL);
if (pMsg->lastSendIndex == pState->lastSendIndex) { if (pMsg->lastSendIndex == pState->lastSendIndex) {
int64_t timeNow = taosGetTimestampMs();
int64_t elapsed = timeNow - pState->lastSendTime;
sNTrace(ths, "sync-append-entries rtt elapsed:%" PRId64 ", index:%" PRId64, elapsed, pState->lastSendIndex);
syncNodeReplicateOne(ths, &(pMsg->srcId), true); syncNodeReplicateOne(ths, &(pMsg->srcId), true);
} }
} }
syncLogRecvAppendEntriesReply(ths, pMsg, "process"); syncLogRecvAppendEntriesReply(ths, pMsg, "process");
return 0; return 0;
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册