[
https://issues.apache.org/jira/browse/RATIS-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16946486#comment-16946486
]
Tsz-wo Sze commented on RATIS-698:
----------------------------------
Thanks [~swagle] for digging out the test failure.
SimpleStateMachine4Testing should check if the peerId before setting
notifiedAsLeader = true; see below.
{code}
@Override
public void notifyLeaderChanged(RaftGroupMemberId groupMemberId, RaftPeerId
raftPeerId) {
if (groupMemberId.getPeerId().equals(raftPeerId)) {
notifiedAsLeader = true;
}
}
{code}
> RaftServerImpl should not enforce minTimeout before first leaderElection cycle
> ------------------------------------------------------------------------------
>
> Key: RATIS-698
> URL: https://issues.apache.org/jira/browse/RATIS-698
> Project: Ratis
> Issue Type: Improvement
> Components: server
> Affects Versions: 0.4.0
> Reporter: Siddharth Wagle
> Assignee: Siddharth Wagle
> Priority: Major
> Fix For: 0.5.0
>
> Attachments: RATIS-698.01.patch, RATIS-698.02.patch,
> RATIS-698.03.patch
>
>
> Followers always wait for (minTimeoutMillis + randomWait), before initiating
> leader election. This penalizes the first time the ratis ring is created or
> when server restarts by enforcing a wait for leader election term.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)