You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Thawan Kooburat (Created) (JIRA)" <ji...@apache.org> on 2012/03/29 03:09:29 UTC

[jira] [Created] (ZOOKEEPER-1436) Add

Add 
----

                 Key: ZOOKEEPER-1436
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1436
             Project: ZooKeeper
          Issue Type: Improvement
          Components: c client
    Affects Versions: 3.4.3
            Reporter: Thawan Kooburat


The zookeeper c client knows how long its session will last, and periodically pings in order to keep that session alive. However, if it loses connection, it hops from ensemble member to ensemble member trying to reform the session - even after the session timeout expires.

This patch at a new session event (ZOO_TIMED_OUT_STATE) that notifies the user that the session timeout has passed, and we have been unable to reconnect. The event is one-shot per disconnection and get generated from the C-client library itself. The server has no knowledge of this event.  

Example use cases:
1. Client can try to reconnect to a different set of observers if it unable to connect to the original set of observers.

2. Client can quickly stop acting as an active server, since other server may already taken over the active role while it is trying to reconnect. 


--
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

        

[jira] [Commented] (ZOOKEEPER-1436) Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection

Posted by "Mark Gius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286114#comment-13286114 ] 

Mark Gius commented on ZOOKEEPER-1436:
--------------------------------------

I'd like to confirm my understanding of this patch, and propose a possible useful extension that may be better off in its own ticket.

Confirm: this is purely a notification for the caller.  The ZK client code is still looping around trying to reconnect just as before.  In other words, if I ignore ZOO_TIMED_OUT_STATE events, the client behavior is unchanged.  

Possible extension: For zookeeper server clusters which are dynamic, it can be very useful to know before a possible EXPIRE event that the client is having trouble connecting.  This gives the caller of the client the chance to re-generate their ZK endpoint list and attempt to recover their session on a new set of hosts.  I suppose this might expose itself as some sort of ZOO_TIMEOUT_WARNING or such that fires when the client has been disconnected for SESSION_EXPIRE / 2 or some such thing.

Otherwise, I really like this as it gives the caller more information with which to make informed decisions.
                
> Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection
> ---------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1436
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1436
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: c client
>    Affects Versions: 3.4.3
>            Reporter: Thawan Kooburat
>            Assignee: Thawan Kooburat
>              Labels: patch
>         Attachments: ZOOKEEPER-1436.patch, ZOOKEEPER-1436.patch
>
>
> The zookeeper c client knows how long its session will last, and periodically pings in order to keep that session alive. However, if it loses connection, it hops from ensemble member to ensemble member trying to reform the session - even after the session timeout expires.
> This patch at a new session event (ZOO_TIMED_OUT_STATE) that notifies the user that the session timeout has passed, and we have been unable to reconnect. The event is one-shot per disconnection and get generated from the C-client library itself. The server has no knowledge of this event.  
> Example use cases:
> 1. Client can try to reconnect to a different set of observers if it unable to connect to the original set of observers.
> 2. Client can quickly stop acting as an active server, since other server may already taken over the active role while it is trying to reconnect. 

--
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

        

[jira] [Updated] (ZOOKEEPER-1436) Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection

Posted by "Thawan Kooburat (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thawan Kooburat updated ZOOKEEPER-1436:
---------------------------------------

    Attachment: ZOOKEEPER-1436.patch

Updated patch file
                
> Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection
> ---------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1436
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1436
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: c client
>    Affects Versions: 3.4.3
>            Reporter: Thawan Kooburat
>            Assignee: Thawan Kooburat
>              Labels: patch
>         Attachments: ZOOKEEPER-1436.patch, ZOOKEEPER-1436.patch
>
>
> The zookeeper c client knows how long its session will last, and periodically pings in order to keep that session alive. However, if it loses connection, it hops from ensemble member to ensemble member trying to reform the session - even after the session timeout expires.
> This patch at a new session event (ZOO_TIMED_OUT_STATE) that notifies the user that the session timeout has passed, and we have been unable to reconnect. The event is one-shot per disconnection and get generated from the C-client library itself. The server has no knowledge of this event.  
> Example use cases:
> 1. Client can try to reconnect to a different set of observers if it unable to connect to the original set of observers.
> 2. Client can quickly stop acting as an active server, since other server may already taken over the active role while it is trying to reconnect. 

--
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

        

[jira] [Commented] (ZOOKEEPER-1436) Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection

Posted by "Thawan Kooburat (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287086#comment-13287086 ] 

Thawan Kooburat commented on ZOOKEEPER-1436:
--------------------------------------------

Yes, we use this as a notification only. We don't change any behavior of the client.

We mainly use this so that master can stop servicing request and let the slave take over. So this event give a sufficient information for us since we also set session timeout to be quite low (4 seconds). I agree that your solution will allow client to implement further optimization to retain the session. 
                
> Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection
> ---------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1436
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1436
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: c client
>    Affects Versions: 3.4.3
>            Reporter: Thawan Kooburat
>            Assignee: Thawan Kooburat
>              Labels: patch
>         Attachments: ZOOKEEPER-1436.patch, ZOOKEEPER-1436.patch
>
>
> The zookeeper c client knows how long its session will last, and periodically pings in order to keep that session alive. However, if it loses connection, it hops from ensemble member to ensemble member trying to reform the session - even after the session timeout expires.
> This patch at a new session event (ZOO_TIMED_OUT_STATE) that notifies the user that the session timeout has passed, and we have been unable to reconnect. The event is one-shot per disconnection and get generated from the C-client library itself. The server has no knowledge of this event.  
> Example use cases:
> 1. Client can try to reconnect to a different set of observers if it unable to connect to the original set of observers.
> 2. Client can quickly stop acting as an active server, since other server may already taken over the active role while it is trying to reconnect. 

--
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

        

[jira] [Updated] (ZOOKEEPER-1436) Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection

Posted by "Thawan Kooburat (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thawan Kooburat updated ZOOKEEPER-1436:
---------------------------------------

    Attachment:     (was: ZOOKEEPER-1436.patch)
    
> Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection
> ---------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1436
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1436
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: c client
>    Affects Versions: 3.4.3
>            Reporter: Thawan Kooburat
>            Assignee: Thawan Kooburat
>              Labels: patch
>         Attachments: ZOOKEEPER-1436.patch, ZOOKEEPER-1436.patch
>
>
> The zookeeper c client knows how long its session will last, and periodically pings in order to keep that session alive. However, if it loses connection, it hops from ensemble member to ensemble member trying to reform the session - even after the session timeout expires.
> This patch at a new session event (ZOO_TIMED_OUT_STATE) that notifies the user that the session timeout has passed, and we have been unable to reconnect. The event is one-shot per disconnection and get generated from the C-client library itself. The server has no knowledge of this event.  
> Example use cases:
> 1. Client can try to reconnect to a different set of observers if it unable to connect to the original set of observers.
> 2. Client can quickly stop acting as an active server, since other server may already taken over the active role while it is trying to reconnect. 

--
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

        

[jira] [Updated] (ZOOKEEPER-1436) Add

Posted by "Thawan Kooburat (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thawan Kooburat updated ZOOKEEPER-1436:
---------------------------------------

    Attachment: ZOOKEEPER-1436.patch
    
> Add 
> ----
>
>                 Key: ZOOKEEPER-1436
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1436
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: c client
>    Affects Versions: 3.4.3
>            Reporter: Thawan Kooburat
>              Labels: patch
>         Attachments: ZOOKEEPER-1436.patch
>
>
> The zookeeper c client knows how long its session will last, and periodically pings in order to keep that session alive. However, if it loses connection, it hops from ensemble member to ensemble member trying to reform the session - even after the session timeout expires.
> This patch at a new session event (ZOO_TIMED_OUT_STATE) that notifies the user that the session timeout has passed, and we have been unable to reconnect. The event is one-shot per disconnection and get generated from the C-client library itself. The server has no knowledge of this event.  
> Example use cases:
> 1. Client can try to reconnect to a different set of observers if it unable to connect to the original set of observers.
> 2. Client can quickly stop acting as an active server, since other server may already taken over the active role while it is trying to reconnect. 

--
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

        

[jira] [Updated] (ZOOKEEPER-1436) Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection

Posted by "Thawan Kooburat (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thawan Kooburat updated ZOOKEEPER-1436:
---------------------------------------

    Attachment: ZOOKEEPER-1436.patch

Updated patch file
                
> Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection
> ---------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1436
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1436
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: c client
>    Affects Versions: 3.4.3
>            Reporter: Thawan Kooburat
>            Assignee: Thawan Kooburat
>              Labels: patch
>         Attachments: ZOOKEEPER-1436.patch, ZOOKEEPER-1436.patch
>
>
> The zookeeper c client knows how long its session will last, and periodically pings in order to keep that session alive. However, if it loses connection, it hops from ensemble member to ensemble member trying to reform the session - even after the session timeout expires.
> This patch at a new session event (ZOO_TIMED_OUT_STATE) that notifies the user that the session timeout has passed, and we have been unable to reconnect. The event is one-shot per disconnection and get generated from the C-client library itself. The server has no knowledge of this event.  
> Example use cases:
> 1. Client can try to reconnect to a different set of observers if it unable to connect to the original set of observers.
> 2. Client can quickly stop acting as an active server, since other server may already taken over the active role while it is trying to reconnect. 

--
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

        

[jira] [Assigned] (ZOOKEEPER-1436) Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt reassigned ZOOKEEPER-1436:
---------------------------------------

    Assignee: Thawan Kooburat
    
> Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection
> ---------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1436
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1436
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: c client
>    Affects Versions: 3.4.3
>            Reporter: Thawan Kooburat
>            Assignee: Thawan Kooburat
>              Labels: patch
>         Attachments: ZOOKEEPER-1436.patch
>
>
> The zookeeper c client knows how long its session will last, and periodically pings in order to keep that session alive. However, if it loses connection, it hops from ensemble member to ensemble member trying to reform the session - even after the session timeout expires.
> This patch at a new session event (ZOO_TIMED_OUT_STATE) that notifies the user that the session timeout has passed, and we have been unable to reconnect. The event is one-shot per disconnection and get generated from the C-client library itself. The server has no knowledge of this event.  
> Example use cases:
> 1. Client can try to reconnect to a different set of observers if it unable to connect to the original set of observers.
> 2. Client can quickly stop acting as an active server, since other server may already taken over the active role while it is trying to reconnect. 

--
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

        

[jira] [Updated] (ZOOKEEPER-1436) Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection

Posted by "Thawan Kooburat (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thawan Kooburat updated ZOOKEEPER-1436:
---------------------------------------

    Summary: Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection  (was: Add )
    
> Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection
> ---------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1436
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1436
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: c client
>    Affects Versions: 3.4.3
>            Reporter: Thawan Kooburat
>              Labels: patch
>         Attachments: ZOOKEEPER-1436.patch
>
>
> The zookeeper c client knows how long its session will last, and periodically pings in order to keep that session alive. However, if it loses connection, it hops from ensemble member to ensemble member trying to reform the session - even after the session timeout expires.
> This patch at a new session event (ZOO_TIMED_OUT_STATE) that notifies the user that the session timeout has passed, and we have been unable to reconnect. The event is one-shot per disconnection and get generated from the C-client library itself. The server has no knowledge of this event.  
> Example use cases:
> 1. Client can try to reconnect to a different set of observers if it unable to connect to the original set of observers.
> 2. Client can quickly stop acting as an active server, since other server may already taken over the active role while it is trying to reconnect. 

--
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

        

[jira] [Commented] (ZOOKEEPER-1436) Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection

Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240876#comment-13240876 ] 

Hadoop QA commented on ZOOKEEPER-1436:
--------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12520346/ZOOKEEPER-1436.patch
  against trunk revision 1302736.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 9 new or modified tests.

    -1 patch.  The patch command could not apply the patch.

Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1017//console

This message is automatically generated.
                
> Add ZOO_TIMED_OUT_STATE sesion event to notify client about timeout during reconnection
> ---------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1436
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1436
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: c client
>    Affects Versions: 3.4.3
>            Reporter: Thawan Kooburat
>              Labels: patch
>         Attachments: ZOOKEEPER-1436.patch
>
>
> The zookeeper c client knows how long its session will last, and periodically pings in order to keep that session alive. However, if it loses connection, it hops from ensemble member to ensemble member trying to reform the session - even after the session timeout expires.
> This patch at a new session event (ZOO_TIMED_OUT_STATE) that notifies the user that the session timeout has passed, and we have been unable to reconnect. The event is one-shot per disconnection and get generated from the C-client library itself. The server has no knowledge of this event.  
> Example use cases:
> 1. Client can try to reconnect to a different set of observers if it unable to connect to the original set of observers.
> 2. Client can quickly stop acting as an active server, since other server may already taken over the active role while it is trying to reconnect. 

--
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