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

C asserts ordering of ping requests, while Java client does not

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.5.0
    • None
    • c client
    • None

    Description

      Affects C clients from 3.3 to trunk.

      The Java client does not enforce ordering on ping requests. It merely updates fields when a ping reply is received and schedules a new ping request when necessary.

      The C client actually enqueues the void response in the completion data structure and pulls it off when it gets a response.

      This sounds like an implementation detail (and it is, sort of), but if a future server were to, say, send unsolicited ping replies to a client to assert liveness, it would work fine against a Java client but would cause a C client to fail the assertion in zookeeper_process, "assert(cptr)", line 2912, zookeeper.c.

      Attachments

        1. ZOOKEEPER-2253.patch
          7 kB
          Chris Chen
        2. ZOOKEEPER-2253.patch
          7 kB
          Chris Chen
        3. ZOOKEEPER-2253.patch
          7 kB
          Chris Chen
        4. zookeeper-2253-3.4.patch
          6 kB
          Chris Chen

        Activity

          People

            cchen Chris Chen
            cchen Chris Chen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: