You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2021/11/04 06:30:02 UTC
[GitHub] [ratis] ChenSammi commented on a change in pull request #521: RATIS-1418. Leader step down for not sending out heartbeat promptly
ChenSammi commented on a change in pull request #521:
URL: https://github.com/apache/ratis/pull/521#discussion_r742567099
##########
File path: ratis-server/src/main/java/org/apache/ratis/server/leader/LogAppenderBase.java
##########
@@ -128,7 +128,8 @@ public AppendEntriesRequestProto newAppendEntriesRequest(long callId, boolean he
final TermIndex previous = getPrevious(follower.getNextIndex());
final long snapshotIndex = follower.getSnapshotIndex();
final long heartbeatRemainingMs = getHeartbeatRemainingTimeMs();
- if (heartbeatRemainingMs <= 0L || heartbeat) {
+ if ((heartbeatRemainingMs <= 0L && follower.getLastHeartbeatSendTime().elapsedTimeMs()
+ > getServer().properties().minRpcTimeoutMs()/4) || heartbeat) {
Review comment:
If (heartbeatRemainingMs <= 0L and follower.getLastHeartbeatSendTime() < min/4), which means we have sent out the heartbeat and have not received the response, then we can go on with sending message. Is this we expected?
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org