Henry Robinson commented on ZOOKEEPER-684:

I have a number of options here, would appreciate thoughts on the right one to 
go with:

1. Write a tricky proxy that intercepts messages for Thread 0 and replies with 
the 'right' message for this interleaving. 
2. Subclass LeaderElection.java with a class that has an almost identical copy 
of lookForLeader, but puts the latch code just before the setCurrentVote call 
so that all threads have done one round simultaneously.
3. Deactivate the test for 3.3.0

I don't like 3, and 1 is too tricky. I'm going to go with 2 for now, although 
it is ugly, because it is correct and hopefully relatively quick to do. 

> 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
> 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