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

Siddharth Wagle edited comment on RATIS-707 at 10/11/19 4:26 AM:
-----------------------------------------------------------------

[~ljain] Can you take a look at this change? I get the 
testBasicAppendEntriesAsync to pass with this change.
Similar to randomized wait between min and max timeouts for leaderElection, the 
heartbeat interval during that time will be randomized for (1, min), instead of 
1 set practical minimum bound to 10.


was (Author: swagle):
[~ljain] Can you take a look at this change? I get the 
testBasicAppendEntriesAsync to pass with this change.
Similar to randomized wait between min and mac timeouts for leaderElection, the 
heartbeat interval during that time will be randomized for (1, min), instead of 
1 set practical minimum bound to 10.

> Test failures caused by minTimeout set to zero
> ----------------------------------------------
>
>                 Key: RATIS-707
>                 URL: https://issues.apache.org/jira/browse/RATIS-707
>             Project: Ratis
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 0.5.0
>            Reporter: Siddharth Wagle
>            Assignee: Siddharth Wagle
>            Priority: Major
>             Fix For: 0.5.0
>
>         Attachments: RATIS-707.01.patch
>
>
> TestRaftAsyncWithGrpc#testBasicAppendEntriesAsync and other tests fail if the 
> initial minTimeout is 0 then the server can trigger a leader election much 
> more frequently because the heartbeat interval is still at minTimeoutMs/2
> {code}
> 2019-10-11 00:45:47,813 INFO  impl.FollowerState 
> (FollowerState.java:run(108)) - s0@group-C51B0F2AC202-FollowerState: change 
> to CANDIDATE, lastRpcTime:21ms, electionTimeout:17ms
> 2019-10-11 00:45:47,870 INFO  impl.FollowerState 
> (FollowerState.java:run(108)) - s0@group-C51B0F2AC202-FollowerState: change 
> to CANDIDATE, lastRpcTime:35ms, electionTimeout:31ms
> 2019-10-11 00:45:47,933 INFO  impl.FollowerState 
> (FollowerState.java:run(108)) - s0@group-C51B0F2AC202-FollowerState: change 
> to CANDIDATE, lastRpcTime:51ms, electionTimeout:51ms
> 2019-10-11 00:45:47,969 INFO  impl.FollowerState 
> (FollowerState.java:run(108)) - s0@group-C51B0F2AC202-FollowerState: change 
> to CANDIDATE, lastRpcTime:22ms, electionTimeout:21ms
> {code}



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

Reply via email to