[
https://issues.apache.org/jira/browse/RATIS-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16944215#comment-16944215
]
Siddharth Wagle commented on RATIS-698:
---------------------------------------
Hi [~szetszwo], I am getting the test to fail as well as work sometimes both
with and without my patch.
Opening separate Jira to look at it:
{code}
s2: RUNNING FOLLOWER s2@group-9F6C12DCC257:t0, leader=null, voted=null,
raftlog=s2@group-9F6C12DCC257-SegmentedRaftLog:OPENED:c-1,f-1,i0, conf=-1:
[s3:0.0.0.0:49315, s4:0.0.0.0:49316, s0:0.0.0.0:49312, s1:0.0.0.0:49313,
s2:0.0.0.0:49314], old=null RUNNING
at
org.apache.ratis.MiniRaftCluster.newIllegalStateExceptionForNoLeaders(MiniRaftCluster.java:506)
at
org.apache.ratis.RaftTestUtil.lambda$waitForLeader$1(RaftTestUtil.java:90)
at org.apache.ratis.MiniRaftCluster.getLeader(MiniRaftCluster.java:539)
at org.apache.ratis.MiniRaftCluster.getLeader(MiniRaftCluster.java:532)
at
org.apache.ratis.RaftTestUtil.lambda$waitForLeader$3(RaftTestUtil.java:98)
at org.apache.ratis.util.JavaUtils.attempt(JavaUtils.java:152)
at org.apache.ratis.RaftTestUtil.waitForLeader(RaftTestUtil.java:97)
at org.apache.ratis.RaftTestUtil.waitForLeader(RaftTestUtil.java:77)
at org.apache.ratis.RaftTestUtil.waitForLeader(RaftTestUtil.java:72)
at
org.apache.ratis.RaftBasicTests.runTestOldLeaderCommit(RaftBasicTests.java:176)
at
org.apache.ratis.MiniRaftCluster$Factory$Get.runWithNewCluster(MiniRaftCluster.java:125)
at
org.apache.ratis.MiniRaftCluster$Factory$Get.runWithNewCluster(MiniRaftCluster.java:113)
at
org.apache.ratis.RaftBasicTests.testOldLeaderCommit(RaftBasicTests.java:172)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
{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
>
>
> 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)