ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-319

add locking around auth info in zhandle_t

    Details

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

      Description

      Looking over the zookeeper.c code it appears to me that the zoo_add_auth() function may be called at any time by the user in their "main" thread. This function alters the elements of the auth_info structure in the zhandle_t structure.

      Meanwhile, the IO thread may read those elements at any time in such functions as send_auth_info() and auth_completion_func(). It seems important, then, to add a lock which prevents data being read by the IO thread while only partially changed by the user's thread. The attached patch add such a lock.

      1. ZOOKEEPER-319.patch
        5 kB
        Chris Darroch
      2. ZOOKEEPER-319.patch
        5 kB
        Mahadev konar
      3. ZOOKEEPER-319.patch
        5 kB
        Chris Darroch

        Activity

        Chris Darroch created issue -
        Chris Darroch made changes -
        Field Original Value New Value
        Attachment ZOOKEEPER-319.patch [ 12400359 ]
        Chris Darroch made changes -
        Attachment ZOOKEEPER-319.patch [ 12400454 ]
        Chris Darroch made changes -
        Attachment ZOOKEEPER-319.patch [ 12400359 ]
        Chris Darroch made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Mahadev konar made changes -
        Attachment ZOOKEEPER-319.patch [ 12400979 ]
        Chris Darroch made changes -
        Attachment ZOOKEEPER-319.patch [ 12401067 ]
        Patrick Hunt made changes -
        Assignee Chris Darroch [ cdarroch ]
        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:
            Chris Darroch
            Reporter:
            Chris Darroch
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development