[
https://issues.apache.org/jira/browse/HBASE-8535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13658636#comment-13658636
]
Eric Yu commented on HBASE-8535:
--------------------------------
testDeleteForZKConnLeak is using a hconnection to create a HTable while another
thread is calling deleteStaleConnection because previous if a hconnection gets
closed at the wrong time while it is being used by constructor of HTable,
HTable constructor can restart zk connection on a closed hconnection. I
couldn't figure out how to reproduce the problem precisely so the test just
calls both a lot in two separate threads and hopes that if a leak exists, it
will happen during the test. However, when the conn gets closed while being
used for HTable constructor, there is an exception and a sleep and a retry
three times (2s, 4s, 8s?) somewhere in the constructor that makes the test
quite slow. I will see if I can set connection property to not do this retry.
> Test for zk leak does not account for unsynchronized access to zk watcher
> -------------------------------------------------------------------------
>
> Key: HBASE-8535
> URL: https://issues.apache.org/jira/browse/HBASE-8535
> Project: HBase
> Issue Type: Test
> Components: Client
> Affects Versions: 0.98.0, 0.95.1
> Reporter: Eric Yu
> Assignee: stack
> Fix For: 0.98.0, 0.95.1
>
> Attachments: HBASE-8535.patch
>
>
> Test can detect a live zk connection in a closed hconnection because it does
> not accesses the zk watcher in a synchronized manner.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira