[ 
https://issues.apache.org/jira/browse/RATIS-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16944228#comment-16944228
 ] 

Tsz-wo Sze commented on RATIS-700:
----------------------------------

BTW, you have copied only part of the messages.  It will be more clear about 
the attempts (e.g. attempt #1/100 below) in the message header.
{code}
2019-10-04 13:14:54,702 WARN  ratis.RaftTestUtil (JavaUtils.java:attempt(158)) 
- FAILED "waitForLeader-null-(expectLeader? true)", attempt #1/100: 
java.lang.IllegalStateException: No leader yet : printing ALL groups
  s3:  RUNNING  FOLLOWER s3@group-CED1BB09E123:t0, leader=null, voted=null, 
raftlog=s3@group-CED1BB09E123-SegmentedRaftLog:OPENED:c-1,f-1,i0, conf=-1: 
[s3:0.0.0.0:49975, s4:0.0.0.0:49976, s0:0.0.0.0:49972, s1:0.0.0.0:49973, 
s2:0.0.0.0:49974], old=null RUNNING
  s4:  RUNNING  FOLLOWER s4@group-CED1BB09E123:t0, leader=null, voted=null, 
raftlog=s4@group-CED1BB09E123-SegmentedRaftLog:OPENED:c-1,f-1,i0, conf=-1: 
[s3:0.0.0.0:49975, s4:0.0.0.0:49976, s0:0.0.0.0:49972, s1:0.0.0.0:49973, 
s2:0.0.0.0:49974], old=null RUNNING
  s0:  RUNNING  FOLLOWER s0@group-CED1BB09E123:t0, leader=null, voted=null, 
raftlog=s0@group-CED1BB09E123-SegmentedRaftLog:OPENED:c-1,f-1,i0, conf=-1: 
[s3:0.0.0.0:49975, s4:0.0.0.0:49976, s0:0.0.0.0:49972, s1:0.0.0.0:49973, 
s2:0.0.0.0:49974], old=null RUNNING
  s1:  RUNNING  FOLLOWER s1@group-CED1BB09E123:t0, leader=null, voted=null, 
raftlog=s1@group-CED1BB09E123-SegmentedRaftLog:OPENED:c-1,f-1,i0, conf=-1: 
[s3:0.0.0.0:49975, s4:0.0.0.0:49976, s0:0.0.0.0:49972, s1:0.0.0.0:49973, 
s2:0.0.0.0:49974], old=null RUNNING
  s2:  RUNNING  FOLLOWER s2@group-CED1BB09E123:t0, leader=null, voted=null, 
raftlog=s2@group-CED1BB09E123-SegmentedRaftLog:OPENED:c-1,f-1,i0, conf=-1: 
[s3:0.0.0.0:49975, s4:0.0.0.0:49976, s0:0.0.0.0:49972, s1:0.0.0.0:49973, 
s2:0.0.0.0:49974], old=null RUNNING, sleep 450ms and then retry.
java.lang.IllegalStateException: No leader yet : printing ALL groups
  s3:  RUNNING  FOLLOWER s3@group-CED1BB09E123:t0, leader=null, voted=null, 
raftlog=s3@group-CED1BB09E123-SegmentedRaftLog:OPENED:c-1,f-1,i0, conf=-1: 
[s3:0.0.0.0:49975, s4:0.0.0.0:49976, s0:0.0.0.0:49972, s1:0.0.0.0:49973, 
s2:0.0.0.0:49974], old=null RUNNING
  s4:  RUNNING  FOLLOWER s4@group-CED1BB09E123:t0, leader=null, voted=null, 
raftlog=s4@group-CED1BB09E123-SegmentedRaftLog:OPENED:c-1,f-1,i0, conf=-1: 
[s3:0.0.0.0:49975, s4:0.0.0.0:49976, s0:0.0.0.0:49972, s1:0.0.0.0:49973, 
s2:0.0.0.0:49974], old=null RUNNING
  s0:  RUNNING  FOLLOWER s0@group-CED1BB09E123:t0, leader=null, voted=null, 
raftlog=s0@group-CED1BB09E123-SegmentedRaftLog:OPENED:c-1,f-1,i0, conf=-1: 
[s3:0.0.0.0:49975, s4:0.0.0.0:49976, s0:0.0.0.0:49972, s1:0.0.0.0:49973, 
s2:0.0.0.0:49974], old=null RUNNING
  s1:  RUNNING  FOLLOWER s1@group-CED1BB09E123:t0, leader=null, voted=null, 
raftlog=s1@group-CED1BB09E123-SegmentedRaftLog:OPENED:c-1,f-1,i0, conf=-1: 
[s3:0.0.0.0:49975, s4:0.0.0.0:49976, s0:0.0.0.0:49972, s1:0.0.0.0:49973, 
s2:0.0.0.0:49974], old=null RUNNING
  s2:  RUNNING  FOLLOWER s2@group-CED1BB09E123:t0, leader=null, voted=null, 
raftlog=s2@group-CED1BB09E123-SegmentedRaftLog:OPENED:c-1,f-1,i0, conf=-1: 
[s3:0.0.0.0:49975, s4:0.0.0.0:49976, s0:0.0.0.0:49972, s1:0.0.0.0:49973, 
s2:0.0.0.0:49974], 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)
{code}


> Fix flaky TestRaftWithGrpc.testOldLeaderCommit
> ----------------------------------------------
>
>                 Key: RATIS-700
>                 URL: https://issues.apache.org/jira/browse/RATIS-700
>             Project: Ratis
>          Issue Type: Improvement
>          Components: test
>    Affects Versions: 0.4.0
>            Reporter: Siddharth Wagle
>            Priority: Major
>
> Fix flaky unit test failing with the following error:
> {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}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to