ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-542

c-client can spin when server unresponsive

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0, 3.2.1
    • Fix Version/s: 3.3.0
    • Component/s: c client
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Due to a mismatch between zookeeper_interest() and zookeeper_process(), when the zookeeper server is unresponsive the client can spin when reconnecting to the server.

      In particular, zookeeper_interest() adds ZOOKEEPER_WRITE whenever there is data to be sent, but flush_send_queue() only writes the data if the state is ZOO_CONNECTED_STATE. When in ZOO_ASSOCIATING_STATE, this results in spinning.

      This probably doesn't affect production, but I had a runaway process in a development deployment that caused performance issues on the node. This is easy to reproduce in a single node environment by doing a kill -STOP on the server and waiting for the session timeout.

      Patch to be added.

      1. ZOOKEEPER-542.patch
        2 kB
        Benjamin Reed
      2. ZOOKEEPER-542.patch
        0.5 kB
        Christian Wiedmann

        Activity

        Christian Wiedmann created issue -
        Christian Wiedmann made changes -
        Field Original Value New Value
        Attachment ZOOKEEPER-542.patch [ 12421374 ]
        Benjamin Reed made changes -
        Attachment ZOOKEEPER-542.patch [ 12421444 ]
        Benjamin Reed made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Fix Version/s 3.3.0 [ 12313976 ]
        Patrick Hunt made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Patrick Hunt made changes -
        Affects Version/s 3.2.1 [ 12314068 ]
        Patrick Hunt made changes -
        Assignee Christian Wiedmann [ wiedmann ]
        Mahadev konar made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Mahadev konar made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Resolution Fixed [ 1 ]
        Patrick Hunt made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Christian Wiedmann
            Reporter:
            Christian Wiedmann
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development