[ 
https://issues.apache.org/jira/browse/HBASE-5682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13242871#comment-13242871
 ] 

Lars Hofhansl edited comment on HBASE-5682 at 3/31/12 12:07 AM:
----------------------------------------------------------------

Here's a patch.
Please have a careful look. I can upload to RB too.

The idea is that if this is an unmanaged Connection (see HBASE-4805), a ZK 
connection is re-establish whenever needed (if it was lost before).

This patch is somewhat more complicated than I'd like, because I did not want 
to change the behavior for managed (default) connections.
If we like I can make this the default behavior... Seems much more robust than 
the current behavior.

I tested this manually, and the connection (if created with 
HConnectionManager.createConnection, and hence unmanaged) recovers from loosing 
both the HBase and ZK connections.

(Interestingly in plain HBase 0.94 the client *never* recovers from this - even 
with the default connection behavior.)

                
      was (Author: lhofhansl):
    Here's a patch.
Please have a careful look. I can upload to RB too.

The idea is that if this is an unmanaged Connection (see HBASE-5399), a ZK 
connection is re-establish whenever needed (if it was lost before).

This patch is somewhat more complicated than I'd like, because I did not want 
to change the behavior for managed (default) connections.
If we like I can make this the default behavior... Seems much more robust than 
the current behavior.

I tested this manually, and the connection (if created with 
HConnectionManager.createConnection, and hence unmanaged) recovers from loosing 
both the HBase and ZK connections.

(Interestingly in plain HBase 0.94 the client *never* recovers from this - even 
with the default connection behavior.)

                  
> Add retry logic in HConnectionImplementation#resetZooKeeperTrackers (port to 
> 0.94)
> ----------------------------------------------------------------------------------
>
>                 Key: HBASE-5682
>                 URL: https://issues.apache.org/jira/browse/HBASE-5682
>             Project: HBase
>          Issue Type: Sub-task
>          Components: client
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>             Fix For: 0.94.1
>
>         Attachments: 5682.txt
>
>
> Just realized that without this HBASE-4805 is broken.
> I.e. there's no point keeping a persistent HConnection around if it can be 
> rendered permanently unusable if the ZK connection is lost temporarily.
> Note that this is fixed in 0.96 with HBASE-5399 (but that seems to big to 
> backport)

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