[
https://issues.apache.org/jira/browse/ZOOKEEPER-1479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13289592#comment-13289592
]
Michi Mutsuzaki commented on ZOOKEEPER-1479:
--------------------------------------------
Hi Stephen,
I think it should. As you point out, it doesn't matter if you are calling
zoo_add_auth() asynchronously, but it gets annoying when you want to call it
synchronously. For example, I was doing something like this in my unit test:
{code}
1. Call zookeeper_init().
2. Wait for the session to become CONNECTED.
3. Call zoo_add_auth().
4. Wait for SUCCESS response.
{code}
and it took me a while to figure out why the test was blocked for 10 seconds in
step 4 (I was using 30 second session timeout).
In general, I think we should wake up the IO thread whenever there is some
stuff to send. Do you see any drawbacks in doing that?
Thanks!
--Michi
> C Client: zoo_add_auth() doesn't wake up the IO thread
> ------------------------------------------------------
>
> Key: ZOOKEEPER-1479
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1479
> Project: ZooKeeper
> Issue Type: Bug
> Components: c client
> Affects Versions: 3.4.3
> Reporter: Michi Mutsuzaki
> Fix For: 3.5.0
>
>
> It can take up to sessionTimeout / 3 for the IO thread to send out the auth
> packet. The {{zoo_add_auth()}} function should call {{adaptor_send_queue(zh,
> 0)}} after {{calling send_last_auth_info(zh)}}.
> --Michi
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira