You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Flavio Junqueira (Commented) (JIRA)" <ji...@apache.org> on 2012/03/21 23:44:40 UTC

[jira] [Commented] (ZOOKEEPER-1225) Successive invocation of LeaderElectionSupport.start() will bring the ELECTED node to READY and cause no one in ELECTED state.

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

Flavio Junqueira commented on ZOOKEEPER-1225:
---------------------------------------------

Hi Rakesh, One question here. In makeOffer, we create an ephemeral, sequential node. Consequently, multiple invocations of start() with the trunk code would create multiple znodes for the same client. Isn't it sufficient that we just consider the first one when we try to determine if a given client is the leader in determineElectionStatus()? 
                
> Successive invocation of LeaderElectionSupport.start() will bring the ELECTED node to READY and cause no one in ELECTED state.
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1225
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1225
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: recipes
>    Affects Versions: 3.3.3
>            Reporter: Rakesh R
>            Assignee: Rakesh R
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1225.patch
>
>
> Presently there is no state validation for the start() api, so one can invoke multiple times consecutively. The second or further invocation will makes the client node to become 'READY' state transition. Because there is an offer already got created during the first invocation of the start() api, the second invocation again makeOffer() and after determination will be chosen as READY state transitions. 
> This makes the situation with no 'ELECTED' nodes present and the client (or the user of the election recipe) will be indefinitely waiting for the 'ELECTED' node.
> Similarly, stop() api can be invoked and there is no state validation and this can dispatch unnecessary FAILED transition events.
> IMO, LES recipe can have validation logic to avoid the successive start() and stop() invocations.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira