GitHub user ramaraochavali opened a pull request:
https://github.com/apache/curator/pull/277
add support for configuring Zk Watches
In our use case, we use `TreeCache` to get Zk Data periodically. We start
`TreeCache` read data and close it. In this use case, The `ZkWatchManager` of
`ZooKeeper` class keeps growing for every TreeCache operation because new
`TreeNode` objects are created and added there leading to a memory leak. Also
since we do not want the Watcher to periodically watch, this creates
unnecessary background operations.
In this PR, Made the createZkWatches configurable in the Builder, so that
use cases like ours can set it to false. The default is true, retaining the
current behaviour.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ramaraochavali/curator
feature/configurable_zk_watchers
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/curator/pull/277.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #277
----
commit d641837ff98e14e1b6d8e0d824690be5244aaf51
Author: Rama <rama.rao@...>
Date: 2018-08-19T06:22:45Z
add support for no watches
----
---