Curator uses the timeouts given when the CuratorFramework object is created to manage the connection. In this instance, after LOST has been received Curator may wait until session timeout before trying to re-create the ZooKeeper object. I'm enclosing a modified version of your test that sets the Curator timeouts to half the time that the test's sleeps wait and you can see that Curator recovers correctly.
-Jordan
|
CuratorFails.java
Description: Binary data
Hi there,
I have found a case in which CuratorFramework is not recovering connection with ZK servers.
The use case is the following: - Start ZK servers - Start application with CuratorFramework - ZK servers goes down. - ZK servers start again. - CuratorFramework app it is not notified that connection is reconnected , but neither notifies that can not recover connection in any way, so application can not recover. Only option is to restart the app. Notice that if CuratorFRamework client is not making any transaction (just comment create() TX), the client is able to reconnect.
I attach a
program able to reproduce the problem
Regards,
Evaristo
<CuratorFails.java>
|