[ 
https://issues.apache.org/jira/browse/RATIS-1881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Song Ziyang resolved RATIS-1881.
--------------------------------
    Fix Version/s: 3.0.0
                   2.5.2
       Resolution: Fixed

The PR is now merged. Thanks [~szetszwo] a lot for working on this!

> 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
>            Priority: Major
>             Fix For: 3.0.0, 2.5.2
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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