XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.5.1
    • 3.0.0, 2.5.2
    • Linearizable Read, server
    • 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

          Activity

            People

              szetszwo Tsz-wo Sze
              liuyaolong Yaolong Liu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h