-
Notifications
You must be signed in to change notification settings - Fork 111
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
Connection loss causes infinite loop #172
Comments
As I understand it, the C client ( A possible solution:
|
Code seems to be ok, but I'm not sure should we close using ZOO_EXPIRED_SESSION_STATE, what about ZOO_CLOSED_STATE? |
I didn't find a ZOO_CLOSED_STATE in the wrapper code. Maybe it should be added in a separate PR @kuebk? |
Connection loss causes infinite loop
When a connection loss occur, and the library reconnects, there is a scenario that causes the library to get stuck in an infinite loop between the
zk_io_cb
andyield
functions inthe C++ wrapper src/node-zk.cpp.
To Reproduce
Steps to reproduce the behavior:
docker stop
on the ZooKeeper server, and wait a couple of seconds.docker start
This has only been reproduced in a docker container with a Linux OS.
Error Log example
A large number of log rows like this:
ZOO_ERROR@zk_io_cb@353: yield:zookeeper_process returned error: -117 - (not error) no server responses to process
Expected behavior
The library should emit a
close
event.Desktop:
The text was updated successfully, but these errors were encountered: