Tsz Wo Nicholas Sze commented on RATIS-201:

Hi Lokesh, the RaftTestUtil.waitForLeader(..) methods (with 
tolerateMultipleLeaders == true) already taking care the multiple leader case.  
The idea is that MiniRaftCluster.getLeader does not wait (just return or throw 
an exception) and RaftTestUtil.waitForLeader may wait for some time.

Do you see any particular tests need to change from MiniRaftCluster.getLeader 
to RaftTestUtil.waitForLeader?

> MiniRaftCluster#getLeader may incorrectly throw IllegalStateException
> ---------------------------------------------------------------------
>                 Key: RATIS-201
>                 URL: https://issues.apache.org/jira/browse/RATIS-201
>             Project: Ratis
>          Issue Type: Bug
>            Reporter: Lokesh Jain
>            Assignee: Lokesh Jain
>            Priority: Major
>         Attachments: RATIS-201.001.patch
> It can be possible for more than one server to have their role set as LEADER 
> in a ratis ring. There can be a race condition where term of a follower is 
> updated but its role is not yet updated to FOLLOWER. In such a scenario 
> MiniRaftCluster#getLeader would throw IllegalStateException.

This message was sent by Atlassian JIRA

Reply via email to