fixed not to try to reconnect when session and connection timeout.#27
fixed not to try to reconnect when session and connection timeout.#27youngwan657 wants to merge 1 commit into
Conversation
|
I don't understand this. This would break major Curator functionality. |
|
Also, what Curator issue does this address? |
|
I have a question. [log] |
|
Watchers in ZooKeeper are one time only. Once the process() method is called, you need to reset the watch by calling whatever method you used originally. Alternatively, use one of the Curator recipes such as NodeCache. |
|
But in this case, process() method wasn't called. That log is curator log not application log. |
|
You can look at various Curator recipes. Generally, when RECONNECTED is received, Curator recipes reset whatever watchers are needed. |
The application received the zookeeper event without any problems after network is reconnected.
e.g.
RetryPolicy retryPolicy = new ExponentialBackoffRetry(Config.BASE_SLEEP_TIME_MS, 3);
CuratorFrameworkFactory.newClient(connectString, 20000, 10000, retryPolicy);
But following example is not working after network is not available for about 30s.
e.g.
RetryPolicy retryPolicy = new ExponentialBackoffRetry(Config.BASE_SLEEP_TIME_MS, 3);
zkClient = CuratorFrameworkFactory.newClient(connectString, 10000, 10000, retryPolicy);
The application didn't receive any zookeeper event after this reset() method is invoked.