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

Ivan Kelly commented on BOOKKEEPER-704:
---------------------------------------

{quote}
I think we basically just need be able to retry zookeeper calls
{quote}
Actually, I don't think this is what we need. Retrying should be left up to the 
user of the zookeeper connection, as it's the client who can make the decision 
whether an operation should be retried or not. What we need is a _reconnecting_ 
zookeeper client. The problem, as I see it is that the zookeeper client is tied 
to a single zookeeper session. This is needed for the things that depend on 
sessions, like ephemerals and stuff. There's a lot of stuff that doesn't 
require sessions though. setData, getData, create, delete don't need session 
stuff.

What I've often seen happen is that there is one zookeeper client opened at 
process start and this passed all around the place. This binds the process 
lifetime to the zookeeper session lifetime. So when the zookeeper session goes 
away, the process has to, which is bad. However, if we had a zookeeper client 
which didn't have ephemerals we could just reconnect as needed, like we do with 
PerChannelBookieClient. If a session goes away, what was pending on that 
session would fail, but the client itself could be reused. We should be able to 
deal with these transient errors in any case.

> reconnectable zookeeper client wrapper
> --------------------------------------
>
>                 Key: BOOKKEEPER-704
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-704
>             Project: Bookkeeper
>          Issue Type: Sub-task
>          Components: bookkeeper-client, bookkeeper-server
>            Reporter: Sijie Guo
>            Assignee: Sijie Guo
>             Fix For: 4.4.0
>
>         Attachments: BOOKKEEPER-704.diff
>
>
> create a reconnectable zookkeeper client wrapper to handle session expire 
> event.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to