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.
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|2d 22h 12m||1||Chris Darroch||20/Feb/09 20:44|
|6d 23h 4m||1||Mahadev konar||27/Feb/09 19:49|
|131d 34m||1||Patrick Hunt||08/Jul/09 20:24|
|Status||Resolved [ 5 ]||Closed [ 6 ]|
|Status||Patch Available [ 10002 ]||Resolved [ 5 ]|
|Resolution||Fixed [ 1 ]|
|Assignee||Chris Darroch [ cdarroch ]|
|Status||Open [ 1 ]||Patch Available [ 10002 ]|
|Field||Original Value||New Value|
|Attachment||ZOOKEEPER-319.patch [ 12400359 ]|