Skip to content

Commit

Permalink
RATIS-2145. Follower hangs until the next trigger to take a snapshot. (
Browse files Browse the repository at this point in the history
  • Loading branch information
z-bb authored Aug 30, 2024
1 parent 520ecab commit dfed101
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ private void sendRequest(AppendEntriesRequest request,
}

private void timeoutAppendRequest(long cid, boolean heartbeat) {
final AppendEntriesRequest pending = pendingRequests.handleTimeout(cid, heartbeat);
final AppendEntriesRequest pending = pendingRequests.remove(cid, heartbeat);
if (pending != null) {
final int errorCount = replyState.process(Event.TIMEOUT);
LOG.warn("{}: Timed out {}appendEntries, errorCount={}, request={}",
Expand Down Expand Up @@ -964,9 +964,5 @@ AppendEntriesRequest remove(AppendEntriesReplyProto reply) {
AppendEntriesRequest remove(long cid, boolean isHeartbeat) {
return isHeartbeat ? heartbeats.remove(cid): logRequests.remove(cid);
}

public AppendEntriesRequest handleTimeout(long callId, boolean heartbeat) {
return heartbeat ? heartbeats.remove(callId) : logRequests.get(callId);
}
}
}

0 comments on commit dfed101

Please sign in to comment.