curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-247) Extend Curator's connection state to support SESSION_LOST
Date Tue, 01 Sep 2015 01:51:47 GMT

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

ASF GitHub Bot commented on CURATOR-247:
----------------------------------------

Github user cammckenzie commented on a diff in the pull request:

    https://github.com/apache/curator/pull/97#discussion_r38379208
  
    --- Diff: curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateManager.java
---
    @@ -240,27 +248,37 @@ private void processEvents()
         {
             try
             {
    -            while ( !Thread.currentThread().isInterrupted() )
    +            while ( !Thread.currentThread().isInterrupted() && (state.get() ==
State.STARTED) )
                 {
    -                final ConnectionState newState = eventQueue.take();
    -
    -                if ( listeners.size() == 0 )
    +                int pollMaxMs = (sessionTimeoutMs * 2) / 3; // 2/3 of session timeout
    --- End diff --
    
    This is the configured session timeout MS. Will this cause issues if the negotiated timeout
is different?
    
    I guess it just means that it will potentially take 4/3 * configured session timeout to
determine if the session has timed out during network partition?


> Extend Curator's connection state to support SESSION_LOST
> ---------------------------------------------------------
>
>                 Key: CURATOR-247
>                 URL: https://issues.apache.org/jira/browse/CURATOR-247
>             Project: Apache Curator
>          Issue Type: Sub-task
>          Components: Framework
>    Affects Versions: 2.8.0
>            Reporter: Jordan Zimmerman
>            Assignee: Jordan Zimmerman
>             Fix For: 3.0.0
>
>
> Currently, Curator has a connection state for LOST that confuses users. It does _not_
mean that the session is lost. Instead it means that the retry policy has given up retrying.
Introduce a new connection state that roughly corresponds to the ZooKeeper session expiring.
Possibly require that clients request this support via a new new builder method in CuratorFrameworkFactory



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message