Tsz-wo Sze created RATIS-1881:
---------------------------------

             Summary: In LeaderStateImpl, set placeHolderIndex from the log
                 Key: RATIS-1881
                 URL: https://issues.apache.org/jira/browse/RATIS-1881
             Project: Ratis
          Issue Type: Improvement
          Components: Leader
            Reporter: Tsz-wo Sze
            Assignee: Tsz-wo Sze


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.




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

Reply via email to