zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cameron McKenzie <mckenzie....@gmail.com>
Subject Re: Reconnection with expired session
Date Wed, 12 Nov 2014 05:32:04 GMT
Thanks for the explanation Jurgen,
Does the client application (using the ZK client libs) actually get a
notification from the ZK client code that this situation has occurred? i.e.
Would it actually be possible for an application to identify this situation
and ask for a new session?

What I seemed to see when I was stepping through in a debugger (and what
the logs would imply) was that the reconnect code would just go around
indefinitely.
cheers


On Wed, Nov 12, 2014 at 2:59 PM, "Jürgen Wagner (DVT)" <
juergen.wagner@devoteam.com> wrote:

>  Hello Cameron,
>   there are two ways in which you can establish a connection to a
> Zookeeper ensemble:
>
> - simply connect
>
> - reconnect
>
> The second case is like the first, except that a session id and password
> are provided to attach the client to the same session context as before.
> What the second log excerpt shows is that Zookeeper refuses the client's
> attempt to attach itself to a previously established session as there is a
> zxid mismatch.
>
> So, the two cases would have to be distinguished in the reconnect code. I
> am not sure if there is enough information to distinguish these cases.
>
> The consequence for the client is that if a reconnection attempt fails, it
> also has the option to try create an entirely new session. However, in that
> case the session initialization (e.g., creating some nodes, placing
> watches) will have to be redone.
>
> Best regards,
> --Jürgen
>
> On 12.11.2014 03:22, Cameron McKenzie wrote:
>
> Thanks Ludwig,
> I understand that it's a rather bogus case, but it is possible (though
> improbable) for this to occur (corrupted disks, whatever). Maybe there's no
> way around it. I wasn't actually testing anything in particular in this
> case, I just happened to have executed this sequence of events and noticed
> that my clients didn't reconnect.
> cheers
>
>
>
>
>
> --
>
> Mit freundlichen Grüßen/Kind regards/Cordialement vôtre/Atentamente/С
> уважением
> *i.A. Jürgen Wagner*
> Head of Competence Center "Intelligence"
> & Senior Cloud Consultant
>
> Devoteam GmbH, Industriestr. 3, 70565 Stuttgart, Germany
> Phone: +49 6151 868-8725, Fax: +49 711 13353-53, Mobile: +49 171 864 1543
> E-Mail: juergen.wagner@devoteam.com, URL: www.devoteam.de
> ------------------------------
> Managing Board: Jürgen Hatzipantelis (CEO)
> Address of Record: 64331 Weiterstadt, Germany; Commercial Register:
> Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message