curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Germán Blanco (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CURATOR-47) Two leaders in the leader election recipe
Date Wed, 17 Jul 2013 13:22:48 GMT

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

Germán Blanco commented on CURATOR-47:
--------------------------------------

Hello,

thanks again for looking at the test. There did seem to be a few things wrong with it. However,
after solving all the things I found, something that might be a problem is still there. I
have modified your test with only three changes:
- Adding a constant NO_ONE = -1 to set the leader when there is no leader (you were using
0 which was also the value for one of the participants.
- Changing session timeout and connection time out for the Curator client.
- revers the order of the log and semaphore release for the connection lost/suspended event
(this might not be required).

Here is the result:
https://gist.github.com/germanblanco/6020438

With this changes I got the "More than one leader" message using your test. Please, help me
find why.
Are there any restrictions on the session and connection timeouts?
                
> Two leaders in the leader election recipe
> -----------------------------------------
>
>                 Key: CURATOR-47
>                 URL: https://issues.apache.org/jira/browse/CURATOR-47
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 2.1.0-incubating
>         Environment: Windows and Java 1.7
>            Reporter: Germán Blanco
>             Fix For: TBD
>
>         Attachments: patch_test_rolling.patch, TestLeaderElection.java
>
>
> When using the Leader Election recipe and doing a rolling restart of the zookeeper servers
in the cluster, it seems that at some points there are two participants that see themselves
as leaders.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message