You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Michi Mutsuzaki (JIRA)" <ji...@apache.org> on 2014/04/24 00:12:15 UTC

[jira] [Updated] (ZOOKEEPER-553) C client's zoo_state function returns unknown state 0

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michi Mutsuzaki updated ZOOKEEPER-553:
--------------------------------------

    Fix Version/s:     (was: 3.5.0)
                   3.6.0

> C client's zoo_state function returns unknown state 0
> -----------------------------------------------------
>
>                 Key: ZOOKEEPER-553
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-553
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: c client, contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Steven Wong
>            Priority: Minor
>             Fix For: 3.6.0
>
>
> Using zkpython with ZK 3.2.1 release:
>   import zookeeper as z
>   zh = z.init(...)
>   z.state(zh)  # returns 3 == z.CONNECTED_STATE
>   # kill standalone ZK server
>   z.state(zh)  # returns 0 == ???
> The problem is that 0 is not a state defined by the C client's zookeeper.[ch]. Perhaps 0 should've been defined as something like DISCONNECTED_STATE? (Java's KeeperState.Disconnected is 0, if that matters.)
> If the fix is to define 0 as a new state, changes will be needed to both the C client and zkpython. Not sure about other bindings.



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