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

Jordan Zimmerman edited comment on CURATOR-110 at 6/5/14 1:04 PM:
------------------------------------------------------------------

This change has exposed an interesting race. TestLeaderLatch.testWaiting() is 
intermittently failing because the initial CONNECTED state change can get 
processed after the initial reset() causing the latch to throttle (i.e. show 
leader and not-leader in quick succession). It's not really a bug but makes 
using it harder as the test shows.


was (Author: randgalt):
This change has exposed an interest race. TestLeaderLatch.testWaiting() is 
intermittently failing because the initial CONNECTED state change can get 
processed after the initial reset() causing the latch to throttle (i.e. show 
leader and not-leader in quick succession). It's not really a bug but makes 
using it harder as the test shows.

> LeaderLatch does not complete if it is started without a connection to 
> ZooKeeper
> --------------------------------------------------------------------------------
>
>                 Key: CURATOR-110
>                 URL: https://issues.apache.org/jira/browse/CURATOR-110
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 2.5.0
>            Reporter: Cameron McKenzie
>            Priority: Minor
>              Labels: connection, latch, leader
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Given the following conditions:
> 1.) No connection is available to ZK
> 2.) A LeaderLatch is created and started
> 3.) All retries for the leader latch creating its ephemeral zNode have been 
> exhausted.
> At this point the LeaderLatch will not begin functioning correctly when a 
> connection is established. This is due to it ignoring 'CONNECTED' connection 
> state events (it only handles RECONNECTED events).
> The fix should simply be a case of making the state handling for CONNECTED 
> and RECONNECTED the same.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to