Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-874

Fix AppendEntry validity checks to take the SnapshotIndex into account

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      This Jira aims to fix the following:

      1. Before sending an appendEntry request to follower, leader checks the validity of the request be verifying if the follower has the previous log entry. But if the follower had installed a snapshot, the previous could be missing and the appendEntry would still be valid. Hence, the SnapshotIndex should be factored in while checking the validity of appendEntry request. Leader should store Follower's SnapshotIndex for this.
      2. When follower receives appendEntry request, it checks the validity of log entry - the first index of the log entry is exactly 1 more than the last log index. During this check, the snapshotIndex should also be considered i.e. the first index of the log entry can be 1 more than the last log index or the snapshotIndex.
      3. After Ratis server is restared, it loads all the available log segments. But logs with end index < last snapshot index should not be loaded. There can be gaps in the log segments upto the snapshotIndex if a snapshot was installed from leader node.

      Attachments

        1. RATIS-874.001.patch
          10 kB
          Hanisha Koneru
        2. RATIS-874.002.patch
          12 kB
          Hanisha Koneru

        Issue Links

          Activity

            People

              hanishakoneru Hanisha Koneru
              hanishakoneru Hanisha Koneru
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 1h 50m
                  1h 50m