You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2023/08/29 21:26:00 UTC
[jira] [Created] (RATIS-1881) In LeaderStateImpl, set placeHolderIndex from the log
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)