Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-553

C client's zoo_state function returns unknown state 0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.2.1
    • None
    • c client, contrib-bindings
    • None

    Description

      Using zkpython with ZK 3.2.1 release:

      import zookeeper as z
      zh = z.init(...)
      z.state(zh) # returns 3 == z.CONNECTED_STATE

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            slider Steven K. Wong
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: