SzyWilliam commented on code in PR #898:
URL: https://github.com/apache/ratis/pull/898#discussion_r1330238865
##########
ratis-server/src/main/java/org/apache/ratis/server/leader/LogAppenderDefault.java:
##########
@@ -73,9 +74,11 @@ private AppendEntriesReplyProto
sendAppendEntriesWithRetries()
}
resetHeartbeatTrigger();
+ final Timestamp sendTime = Timestamp.currentTime();
getFollower().updateLastRpcSendTime(request.getEntriesCount() == 0);
final AppendEntriesReplyProto r =
getServerRpc().appendEntries(request);
getFollower().updateLastRpcResponseTime();
+ getFollower().updateLastRespondedAppendEntriesSendTime(sendTime);
Review Comment:
`getServerRpc().appendEntries(request)` is a blocking operation, and once
this call returns, the response for the current AppendEntries request has been
received. Therefore, we can update its(`LastRespondedAppendEntries`)sendTime.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]