GitHub user gopikori opened a pull request:

    https://github.com/apache/curator/pull/58

    If zookeeper is down when discovery is started, it fails to register when 
the zookeeper comes up for the first time.

    **The issue:** If zookeeper is down when discovery is started, it fails to 
register when the zookeeper comes up for the first time. However, if the 
zookeeper is restarted again, it discovery will connect and register the 
service instance correctly.
    **Cause :** This happened because 
*org.apache.curator.x.discovery.details.ServiceDiscoveryImpl.stateChanged()* 
considered only *ConnectionState.RECONNECTED* state and not 
*ConnectionState.CONNECTED*.  This caused the first connection to be ignored, 
while subsequent connection recoveries worked fine. 
    
    This pull request has fix for the same and a test case for it.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gopikori/curator CURATOR-175

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/curator/pull/58.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #58
    
----
commit 4190147dbedb350ce1d42eb1ace86de0d0c9aef9
Author: gopi <[email protected]>
Date:   2014-12-28T13:53:26Z

    If zookeeper is down when discovery is started, it fails to register
    when the zookeeper comes up for the first time. This commit has fix for
    this issue

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to