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

In LeaderStateImpl, set placeHolderIndex from the log

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0, 2.5.2
    • Leader
    • None

    Description

      In LeaderStateImpl, the placeHolderIndex is set to nextIndex in the constructor. However, the placeHolder log is created in start() method using nextIndex again. Both the constructor and the start() method are called in RaftServerImpl.changeToLeader() which is synchronized. So, the nextIndex won't change in-between.

      As an improvement, it is better to get nextIndex once.

      Attachments

        Issue Links

          Activity

            People

              szetszwo Tsz-wo Sze
              szetszwo Tsz-wo Sze
              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 - 10m
                  10m