[ 
https://issues.apache.org/jira/browse/RATIS-1872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17755340#comment-17755340
 ] 

Yaolong Liu commented on RATIS-1872:
------------------------------------

 [~szetszwo] would you like take a look at this issue,thanks in advance!

> HeartbeatAck use in-correct callId as minCallId
> -----------------------------------------------
>
>                 Key: RATIS-1872
>                 URL: https://issues.apache.org/jira/browse/RATIS-1872
>             Project: Ratis
>          Issue Type: Sub-task
>          Components: server
>    Affects Versions: 2.5.1
>            Reporter: Yaolong Liu
>            Priority: Critical
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to