-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Session expired bad behavior #15
Comments
Hi Vincent, Thanks for the report. Well, I really want to have node-zookeeper merge in I probably don't see this because I do that poll on getState bit (i.e., Thoughts? m On Tue, Sep 25, 2012 at 8:39 AM, Vincent Voyer notifications@github.comwrote:
|
I switched back to node-zookeeper in our zkplus fork and it seems to work well. About polling the state. This compare to websockets() and long polling in browser. If I have websockets and I still need to setInterval an ajax request then I failed. Perhaps I am wrong on this as I do not have a long experience with zookeeper and do not understand the whole idea behind it. |
Hello.
Since you switched to your mcavage/node-zookeeper fork, there's no more a 'close' event sent when a zookeeper session expires.
We have been able to reproduce this, very easy:
sudo ifconfig vboxnet0 down
sudo ifconfig vboxnet0 up
What happens:
Expected behavior:
Your fork does not send a close event, thus our code around session disconnection and reconnect does not work anymore: 6a97b30
Putting back "official" node-zookeeper works well, because we do receive a close event when session expires.
I guess we could hack
node-zkplus/lib/client.js
Line 799 in 733906c
What do you think ?
PS1:
I hope you do monitor your zk connection status from a client side.
Because when session expires (eg: network interruption, garbage collector working for more than zookeeper timeout), you will never know it ONLY if you do watch for -1 state in your watches.
PS2:
We could not understand how is it possible that our nodejs client and zookeeper server were not able to reach each other for 30 seconds (our timeout), did you already have experienced similar issues with node-zookeeper? (your fork, the official)
The text was updated successfully, but these errors were encountered: