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

RaftLogBase#updateCommitIndex should return true only if commitIndex is increased

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.1.1
    • server
    • None

    Description

      RaftLogBase#updateCommitIndex returns true regardless whether commit index is actually increased (RaftLogIndex#updateIncreasingly returns true). This can cause unnecessary StateMachineUpdater notification

      We can change it so that RaftLogBase#updateCommitIndex only returns true if commit index is actually increased. 

      Note: For leader ServerState#updateCommitIndex is called only if there are entries to commit (i.e. majority > oldLasCommitted), so RaftLogBase#updateCommitIndex should increase the commit index of leader.

      Attachments

        Issue Links

          Activity

            People

              ivanandika Ivan Andika
              ivanandika Ivan Andika
              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 - 20m
                  20m