You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by tiny657 <gi...@git.apache.org> on 2014/07/31 10:01:42 UTC

[GitHub] curator pull request: fixed not to try to reconnect when session a...

GitHub user tiny657 opened a pull request:

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

    fixed not to try to reconnect when session and connection timeout.

    This example is working fine when network is not available.
    e.g.
    RetryPolicy retryPolicy = new ExponentialBackoffRetry(Config.BASE_SLEEP_TIME_MS, 3);
    CuratorFrameworkFactory.newClient(connectString, 20000, 10000, retryPolicy);
    
    
    But this example is not working when network is not available.
    e.g.
    RetryPolicy retryPolicy = new ExponentialBackoffRetry(Config.BASE_SLEEP_TIME_MS, 3);
    zkClient = CuratorFrameworkFactory.newClient(connectString, 10000, 10000, retryPolicy);
    
    The application didn't receive any zookeeper event after this reset() method is invoked.


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

    $ git pull https://github.com/tiny657/curator fixReconnection

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

    https://github.com/apache/curator/pull/27.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 #27
    
----
commit fe95e2c9a98d51c7b176d72754cc36270a471df6
Author: Youngwan Lim <ti...@gmail.com>
Date:   2014-07-31T07:47:47Z

    fixed not to try to reconnect when session and connection timeout.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request: fixed not to try to reconnect when session a...

Posted by tiny657 <gi...@git.apache.org>.
Github user tiny657 commented on the pull request:

    https://github.com/apache/curator/pull/27#issuecomment-50844590
  
    But in this case, process() method wasn't called.  
    The application didn't detect any event.  


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request: fixed not to try to reconnect when session a...

Posted by Randgalt <gi...@git.apache.org>.
Github user Randgalt commented on the pull request:

    https://github.com/apache/curator/pull/27#issuecomment-50755861
  
    Also, what Curator issue does this address?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request: fixed not to try to reconnect when session a...

Posted by Randgalt <gi...@git.apache.org>.
Github user Randgalt commented on the pull request:

    https://github.com/apache/curator/pull/27#issuecomment-50844360
  
    Watchers in ZooKeeper are one time only. Once the process() method is called, you need to reset the watch by calling whatever method you used originally. Alternatively, use one of the Curator recipes such as NodeCache.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request: fixed not to try to reconnect when session a...

Posted by tiny657 <gi...@git.apache.org>.
Github user tiny657 commented on the pull request:

    https://github.com/apache/curator/pull/27#issuecomment-50842556
  
    I have a question.
    How do I watch the znode again when reconnected after connection and session timeout?
    I think the application didn't know RECONNECTED state. 
    Therefore the application didn't watch any change of the znode after that.
    
    [log]
    Connection attempt unsuccessful after 10205 (greater than max timeout of 10000). Resetting connection and trying again with a new connection.
    reset
    State change: RECONNECTED
    There are no ConnectionStateListeners registered.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request: fixed not to try to reconnect when session a...

Posted by Randgalt <gi...@git.apache.org>.
Github user Randgalt commented on the pull request:

    https://github.com/apache/curator/pull/27#issuecomment-50844642
  
    You can look at various Curator recipes. Generally, when RECONNECTED is received, Curator recipes reset whatever watchers are needed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request: fixed not to try to reconnect when session a...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] curator pull request: fixed not to try to reconnect when session a...

Posted by Randgalt <gi...@git.apache.org>.
Github user Randgalt commented on the pull request:

    https://github.com/apache/curator/pull/27#issuecomment-50753006
  
    I don't understand this. This would break major Curator functionality.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---