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

Eugene Koontz updated ZOOKEEPER-1437:
-------------------------------------

    Attachment: ZOOKEEPER-1437.patch

Hi Patrick,

Thanks as always for your comments and help.

With regard to Xids: I don't see how the event thread can call sendPacket(). It 
seems to me that *only* the send thread can call getXid() or sendPacket(), and 
therefore, packets can only be sent in the correct order. 

I put some test logging in ClientCnxn::getXid():

{code}
LOG.info("getXid() being called from thread: " + 
Thread.currentThread().getName());
{code}

and the logging always reports SendThread.

With regard to spinning on the write interest - you are right, this was 
happening. I've created a new patch that prevents spinning in doIO(). It works 
by calling disableWrite() in doIO() if no packet can be sent because SASL 
authentication is ongoing. enableWrite(), in turn, is called after SASL 
authentication is completed. This makes the patch a bit more complicated to 
follow, I'm afraid, but I think I'm on the right track. 

I'm attaching the patch and opening a review on reviews.apache.org as you asked.

                
> Client uses session before SASL authentication complete
> -------------------------------------------------------
>
>                 Key: ZOOKEEPER-1437
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1437
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: java client
>    Affects Versions: 3.4.3
>            Reporter: Thomas Weise
>            Assignee: Eugene Koontz
>             Fix For: 3.4.4, 3.5.0
>
>         Attachments: ZOOKEEPER-1437.patch, ZOOKEEPER-1437.patch, 
> ZOOKEEPER-1437.patch, ZOOKEEPER-1437.patch, ZOOKEEPER-1437.patch, 
> ZOOKEEPER-1437.patch, ZOOKEEPER-1437.patch, ZOOKEEPER-1437.patch, 
> ZOOKEEPER-1437.patch, ZOOKEEPER-1437.patch, ZOOKEEPER-1437.patch, 
> ZOOKEEPER-1437.patch, ZOOKEEPER-1437.patch, ZOOKEEPER-1437.patch
>
>
> Found issue in the context of hbase region server startup, but can be 
> reproduced w/ zkCli alone.
> getData may occur prior to SaslAuthenticated and fail with NoAuth. This is 
> not expected behavior when the client is configured to use SASL.

--
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

        

Reply via email to