Details
-
Sub-task
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
2.5.1
-
None
Description
In https://issues.apache.org/jira/browse/RATIS-1663 we add callId to all appendLog reuest. When trigger heartbeat,we need the reply comes after the trigger as below.
private boolean isValid(AppendEntriesReplyProto reply) { if (reply == null || !reply.getServerReply().getSuccess()) { return false; } // valid only if the reply has a later call id than the min. return appender.getCallIdComparator().compare(reply.getServerReply().getCallId(), minCallId) >= 0; }
However,the minCallId is initialize when we get heartBeatAck,this is in correct. If the callId of our triggerHeartbeat is 10, the callId may increase to 20 while waiting for the reply, when we receive the reply, the minCallId is set to 20, and all heartbeat messages are considered invalid.
Attachments
Issue Links
- links to