refactor(sync): add rtt trace log
This commit is contained in:
parent
7d63efd2af
commit
475919dd77
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue