Henry Robinson updated ZOOKEEPER-684:

    Attachment: ZOOKEEPER-684.patch

This patch includes a fairly hacky mocking out of LeaderElection to fix the 
observed race, and another improvement to fix another race that cropped up 
(mockServer not starting in time, leading to a potential timeout like Flavio 

I could reproduce a failure before this patch was finished, and can't now, but 
please test yourselves. 

In order to mock QuorumPeer and LeaderElection I made a number of member 
variables protected rather than private, and put 'running' behind a getter / 
setter interface. 

> Race in LENonTerminateTest
> --------------------------
>                 Key: ZOOKEEPER-684
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-684
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: leaderElection, server
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Henry Robinson
>            Priority: Critical
>             Fix For: 3.3.0
>         Attachments: zookeeper-684-test-failure.rtf, ZOOKEEPER-684.patch, 
> ZOOKEEPER-684.patch
> testNonTermination failed during a Hudson run for ZOOKEEPER-59. After 
> inspecting the output, it looks like server is electing 2 as a leader and 
> leaving. Given that 2 is just a mock server, server 0 remains alone in leader 
> election.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to