hadoop-zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Darroch (JIRA)" <j...@apache.org>
Subject [jira] Updated: (ZOOKEEPER-319) add locking around auth info in zhandle_t
Date Wed, 18 Feb 2009 22:10:01 GMT

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

Chris Darroch updated ZOOKEEPER-319:
------------------------------------

    Attachment:     (was: ZOOKEEPER-319.patch)

> add locking around auth info in zhandle_t
> -----------------------------------------
>
>                 Key: ZOOKEEPER-319
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-319
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.0.0, 3.0.1, 3.1.0
>            Reporter: Chris Darroch
>             Fix For: 3.1.1, 3.2.0
>
>         Attachments: ZOOKEEPER-319.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message